opentelemetry-instrumentation-operator

command module
v0.0.0-...-c857990 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

OpenTelemetry instrumentation operator

This project is POC/work in progress!

OpenTelemetry instrumentation operator injects OpenTelemetry auto instrumentation into deployment. For the configuration see instrumentation-cr.

Enable instrumentation

Right now the instrumentation CR has to be created in every namespace where instrumentation is enabled. Then label opentelemetry-inst-java=enabled has to be added on a workload or namespace.

Create the following CR in a namespace:

cat <<EOF | kubectl apply -f -
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryInstrumentation
metadata:
  name: opentelemetry-instrumentation
spec:
  OTLPEndpoint: http://otel-collector.otel:4317
  javaagentImage: ghcr.io/pavolloffay/otel-javaagent:1.5.3
  tracesSampler: parentbased_traceidratio
  tracesSamplerArg: "1"
  resourceAttributes:
    environment: prod
EOF

Enable instrumentation for all applications in a namespace:

kubectl label namespace/default opentelemetry-inst-java=enabled
Enable instrumentation per workload
kubectl label deployment.apps/java-app opentelemetry-inst-java=enabled

List instrumented apps

kubectl get deployments -l opentelemetry-java-enabled=true

The status object will list instrumentations in the future.

List Instrumentation CRs

kubectl get opentelemetryinstrumentations 

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=opentelemetry.io
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=opentelemetry.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL