How instrumentation is injected
1
Webhook interception
The operator’s mutating admission webhook intercepts every pod creation request in namespaces where an
AutoInstrumentation resource exists.2
Label matching
The webhook checks whether the pod’s labels match the
spec.selector of any AutoInstrumentation resource in the same namespace.3
Init container injection
If the pod matches, the webhook mutates the pod spec to add an init container using the configured instrumentation provider’s image.
4
Environment setup
The init container copies instrumentation packages to a shared
emptyDir volume and sets up the Python path and OpenTelemetry environment variables.5
Application start
Your application container starts with
PYTHONPATH pointing to the instrumentation packages. Instrumentation is active from the first line of your code.6
Telemetry collection
Traces, metrics, and cost data are automatically collected and forwarded to the OTLP endpoint you configured.
Annotating a Deployment
To instrument a Deployment, add matching labels so theAutoInstrumentation selector picks it up. If you used the quickstart AutoInstrumentation resource with matchLabels: instrumentation: openlit, label your Deployment like this:
Supported providers
The operator supports four instrumentation providers. Choose based on your observability requirements and the standards your organization follows.OpenLIT
Full AI observability built on OpenTelemetry. Provides 50+ AI instrumentations including comprehensive cost tracking, GPU metrics, and agent workflow tracing.OpenInference
OpenInference conventions built on top of OpenTelemetry for tracing AI applications. Covers 30+ instrumentations with a focus on OpenTelemetry standard compliance.OpenLLMetry
A set of OpenTelemetry extensions focused on LLM observability. Covers 30+ instrumentations across LLM providers and frameworks.Custom provider
Bring your own instrumentation init container image. Useful when you have a private fork, a specific pinned version, or a fully custom instrumentation setup.Provider comparison
Custom configuration
Additional pip packages
Install extra packages alongside the instrumentation provider usingcustomPackages:
Environment variables
Inject environment variables into instrumented containers viaspec.python.instrumentation.env. These accept plain values, secretKeyRef, configMapKeyRef, and fieldRef sources:
Excluding pods from instrumentation
Usespec.ignore to skip specific pods even when they match the main selector:
Troubleshooting
Provider image not found
Provider image not found
Symptoms: Init container fails with image pull errors
Package version conflicts
Package version conflicts
Symptoms: Application fails to start with pip dependency errorsPin packages to specific versions:
No telemetry data
No telemetry data
Symptoms: The application starts but no traces appear in your backend
