Skip to content

Что такое OpenTelemetry

Коротко:

OpenTelemetry (OTel) — CNCF-graduated vendor-neutral standard и tooling для collection + export observability data. Combines OpenTracing + OpenCensus (слияние 2019). Support: metrics, logs, traces через single SDK для 15+ languages. Auto-instrumentation для popular frameworks (Express, FastAPI, Django, Spring). Export в любой backend: Jaeger, Prometheus, Datadog, New Relic, Grafana Tempo.

Ниже: подробности, пример, смежные термины, FAQ.

Подробности

  • SDK (в app): generates spans, metrics
  • Collector: receives from SDK, processes (sampling, filtering), exports
  • Exporters: Jaeger, Prometheus, OTLP (open protocol), vendor-specific
  • Auto-instrumentation: drop-in для Express, Flask, Django, FastAPI, Spring, Rails
  • Context propagation: trace_id через HTTP headers (W3C Trace Context)

Пример

// Node.js Express auto-instrumentation
const { NodeSDK } = require('@opentelemetry/sdk-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const sdk = new NodeSDK({
  instrumentations: [getNodeAutoInstrumentations()],
});
sdk.start();  // Now all Express routes auto-traced

Смежные термины

Больше по теме

Часто задаваемые вопросы

OpenTelemetry vs Datadog agent?

OTel — open standard, vendor-neutral. Datadog agent — vendor-specific, более deep integrations. OTel migration easier if switch vendors.

Производительность overhead?

2-5% CPU overhead с auto-instrumentation. Sampling (1-10% traces) снижает.

Stable release?

Tracing — stable с 2021. Metrics — stable с 2023. Logs — stable с 2024. All three usable в prod.