OpenTelemetry (OTel) is a CNCF standard and SDK set for generating traces, metrics and logs, plus a Collector that receives, processes and exports them to any backend.
Why teams use it
- Vendor-neutral instrumentation - swap backends without re-instrumenting
- One Collector pipeline for traces, metrics and logs
- Auto-instrumentation for many languages and frameworks
Install it
docker run -p 4317:4317 -p 4318:4318 \
-v $PWD/otel.yaml:/etc/otelcol/config.yaml otel/opentelemetry-collectorA first working config
A Collector pipeline: receive OTLP, batch, export.
receivers:
otlp: { protocols: { grpc: {}, http: {} } }
processors:
batch: {}
exporters:
prometheus: { endpoint: 0.0.0.0:8889 }
otlphttp: { endpoint: https://tempo:4318 }
service:
pipelines:
traces: { receivers: [otlp], processors: [batch], exporters: [otlphttp] }
metrics: { receivers: [otlp], processors: [batch], exporters: [prometheus] }Run and verify
Auto-instrument a Python app with zero code changes.
pip install opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 \
opentelemetry-instrument python app.pyMistakes to avoid early
- Sampling misconfigured, so you keep everything and blow up cost
- Mixing SDK versions and losing context propagation
- Exporting directly from apps instead of through a Collector
Want senior help putting OpenTelemetry to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.