OpenTelemetry SDK Configuration
Cheat sheet · https://pcornel.dk/topic.php?topic=6214
Answer
OpenTelemetry SDK configuration sets the resource (service.name, version, environment), exporters, propagators, samplers and batch settings — usually via OTEL_* environment variables.
Remember
Set OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES everywhere. Point OTEL_EXPORTER_OTLP_ENDPOINT to the local Collector. Use the batch processor in production.
First checks
env | grep ^OTEL_— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
Verify in this order
env/config → SDK provider → processors → exporter → Collector
Where it usually breaks
Sending http/protobuf to the gRPC port fails silently in some SDKs.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6214