Pcornel
Observability · OpenTelemetry

OpenTelemetry Auto-Instrumentation

Cheat sheet · https://pcornel.dk/topic.php?topic=6235

Back to the Topic

Answer

OpenTelemetry auto-instrumentation adds tracing and metrics to applications without code changes using language agents (Java agent, Python/Node/.NET instrumentation) or the Kubernetes Operator.

Remember

Auto-instrumentation covers common libraries; add manual spans for business logic. Check agent version compatibility and overhead. Disable noisy instrumentations.

First checks

  • java -javaagent:opentelemetry-javaagent.jar -jar app.jar — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid

Verify in this order

agent loaded → libraries patched → spans/metrics → exporter

Where it usually breaks

Unsupported library versions produce no spans.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6235

Confirmation

Confirm action

Continue?