Kubernetes Injection
Note: This page is auto-generated from the opentelemetry-dotnet-distribution repository.
The Dash0 Kubernetes operator instruments .NET workloads with this distribution without any changes to the application or its container image. This page describes what the operator does. To install the operator and turn on workload instrumentation, see the operator documentation.
How the distribution reaches the pod
The operator's instrumentation image contains both the glibc and the musl archive of this distribution for the architecture of the node.
When the operator instruments a pod, it adds an init container or an image volume that makes the instrumentation files available in the application container.
The operator does not use instrument.sh.
How the distribution is activated
The operator sets LD_PRELOAD to the OpenTelemetry injector and sets the OTLP export variables, such as OTEL_EXPORTER_OTLP_ENDPOINT.
When a process starts in the container, the injector detects whether it is a .NET process.
For .NET, the injector selects the glibc or the musl copy of the distribution to match the container, and sets these variables in the environment of the process:
OTEL_DOTNET_AUTO_HOMECORECLR_ENABLE_PROFILING,CORECLR_PROFILER, andCORECLR_PROFILER_PATHDOTNET_STARTUP_HOOKS
The operator and the injector also set OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES from the metadata of the workload, so that the telemetry is attributed to the correct Kubernetes resources.
Supported .NET versions
The injector activates the distribution for .NET 6 and later only. On an older runtime, the process starts without instrumentation.
Verify the instrumentation
After the operator restarts or recreates the pods of an instrumented workload, the container of the application has the LD_PRELOAD variable, and its telemetry appears in Dash0 under the service name of the workload.
If no telemetry arrives, set OTEL_LOG_LEVEL=debug on the workload and read the diagnostic logs of the distribution, see Configuration.
Last updated: