OpenTelemetry unifies metrics, logs, and traces under one open standard — here is how it works, what it replaces, and how to instrument your first service in 20 minutes.
Use the tail_sampling processor in the OTel Collector with a composite policy: always sample spans where status.code equals ERROR or http.status_code is 5xx, and probabilistically sample the remaining healthy traces at 5-10%. The Collector must buffer spans until the root span arrives to make the sampling decision, requiring adequate memory allocation in high-throughput deployments.
Exemplars require Prometheus to be started with the --enable-feature=exemplar-storage flag, and the Grafana datasource must have exemplars enabled in its configuration with a valid traceIdLabelName matching your OTel trace ID label. Additionally, the Prometheus client SDK must emit exemplars on histogram observations — the OTel Go SDK does this automatically but older Java agent versions require explicit exemplar filter configuration.
Discussion0