Which standard `OTEL_*` environment variables do you use most?
BeginnerConceptTracing & OpenTelemetry
Answer
All official SDKs honour the same variables, which makes Kubernetes configuration uniform:
OTEL_SERVICE_NAME=payments
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=prod,service.version=2.3.0
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-agent:4317
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
OTEL_TRACES_SAMPLER=parentbased_traceidratio
OTEL_TRACES_SAMPLER_ARG=0.2
OTEL_PROPAGATORS=tracecontext,baggage
OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=otlp # or none / prometheus
OTEL_LOGS_EXPORTER=otlp
OTEL_SDK_DISABLED=false
In Kubernetes we often set the endpoint to the node's agent with valueFrom.fieldRef.fieldPath: status.hostIP. The OpenTelemetry Operator's Instrumentation resource injects these automatically.
More on Tracing & OpenTelemetry
What is distributed tracing, and what are a trace, a span and a span context?BeginnerWhat fields does an OpenTelemetry span carry?BeginnerWhat are span kinds and why do they matter?IntermediateWhat does the W3C `traceparent` header look like?IntermediateWhat is baggage, and how is it different from span attributes?IntermediateWhat is OpenTelemetry and what are its main parts?Beginner