RousselTMLEARNING

Article · OpenTelemetry: From Discovery to Expertise

OpenTelemetry fundamentals

1. A single standard for telemetry #

Where OpenTelemetry comes from and what it standardizes.

Origins #

OpenTelemetry (OTel) was born in 2019 from the merger of two competing projects, OpenTracing and OpenCensus. Hosted by the CNCF, it has become the foundation's second most active project after Kubernetes. It neither stores nor displays anything: it standardizes how telemetry is produced and transported, which you then send to the backend of your choice.

OpenTelemetry providesOpenTelemetry does not provide
a specification, APIs and SDKs for about ten languagesa telemetry database
the OTLP protocoldashboards or an alerting engine
the Collector (reception, processing, export)an analysis tool: that is the role of Grafana, Jaeger, Elastic, Datadog, Dynatrace…
semantic conventions (common attribute names)

The four signals #

OpenTelemetry signals
All signals of a service carry the same resource, which makes it possible to link them.
SignalAnswersSpecification status
Traceswhere did this request go and where did it lose time?stable
Metricshow much, how fast, is it normal?stable
Logswhat exactly happened at that moment?stable (data model and SDK)
Profileswhich function consumes CPU or memory?in development (alpha)

Baggage complements these signals: key-value pairs propagated from one service to the next (customer or tenant identifier) that each service can read and add to its telemetry.

2. The building blocks #

API, SDK, resource, scope and context.

API and SDK #

API, SDK and exporters
A library instrumented with the API costs nothing as long as the application does not install an SDK.

This separation lets library authors (web frameworks, HTTP clients, database drivers) instrument their code once and for all, without imposing a backend or a heavy dependency on their users.

Resource and instrumentation scope #

NotionDescribesExamples
Resourcethe entity producing the telemetry: identical for all signals of a processservice.name, service.version, deployment.environment.name, host.name, k8s.pod.name
Instrumentation scopethe library that produced a piece of dataopentelemetry.instrumentation.flask 0.48b0, or the name of your module
Attributescontext specific to a piece of datahttp.request.method, http.response.status_code, db.system.name
Common mistake: Without service.name, SDKs use unknown_service: your data becomes impossible to find. It is the first attribute to define.

Context and propagation #

The context carries the active trace and span identifiers within a process; propagation passes it from one process to another (HTTP traceparent header, gRPC metadata, Kafka message headers). This is what makes it possible to assemble a distributed trace and link logs and metrics to the trace that produced them.

3. Configuring #

Environment variables and declarative configuration.

OTEL_* variables #

All SDKs share the same environment variables: an application is configured the same way whatever its language.

export OTEL_SERVICE_NAME=checkout
export OTEL_RESOURCE_ATTRIBUTES=service.version=1.4.0,deployment.environment.name=production
export OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_TRACES_EXPORTER=otlp OTEL_METRICS_EXPORTER=otlp OTEL_LOGS_EXPORTER=otlp
export OTEL_TRACES_SAMPLER=parentbased_traceidratio OTEL_TRACES_SAMPLER_ARG=0.2
export OTEL_PROPAGATORS=tracecontext,baggage
Good practice: In development, OTEL_TRACES_EXPORTER=console prints spans in the terminal: the fastest way to check an instrumentation.

Declarative configuration #

For complex cases (several exporters, metric views, composite samplers), OpenTelemetry defines a YAML configuration file common to all SDKs, referenced by an environment variable (OTEL_CONFIG_FILE, formerly OTEL_EXPERIMENTAL_CONFIG_FILE). Support varies by language: check your SDK's documentation.

4. Reading maturity #

Not confusing stable with experimental.

Stability levels #

LevelMeaningIn production
Development / Experimentalcan change or disappear without noticeavoid, or isolate
Alphafunctional, API still subject to changefor early adopters
Betaclose to stable, rare changeswith caution
Stableguaranteed compatibilityyes

Maturity is read per signal, per language and per component: Java traces have been stable for a long time, logs in another language may still be in beta, a Collector receiver may be in alpha. The « Status » pages on opentelemetry.io and the metadata.yaml file of each Collector component are authoritative.

Good to know: Instrumentation package versions ending in b0 (Python) or -alpha (Java) indicate semantic conventions that are not yet stable for that library.

📄 Core OpenTelemetry concepts: signals, resources, context and maturity →

My progress

  • ⏱ Estimated time : ≈ 7 min

Sign in to track your progress and take notes. Sign in

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Recommended Articles

OpenTelemetry: automatic vs manual instrumentation

Understand the differences between automatic and manual instrumentation with OpenTelemetry, their...

Sending traces to Tempo: OpenTelemetry instrumentation and Alloy

Produce and route traces to Tempo: Python/Java/Node auto-instrumentation, the manual SDK, OTEL en...

OpenTelemetry on Kubernetes: Operator, auto-instrumentation and Collector

Deploy OpenTelemetry on Kubernetes: Collector deployment modes (DaemonSet, Deployment, sidecar, S...

Capstone project: the four signals of the OpenTelemetry Demo in the Grafana stack

A capstone project spanning the observability courses: deploy the OpenTelemetry Demo, send metric...

Instrumenting applications for Jaeger with OpenTelemetry

Send traces to Jaeger with OpenTelemetry: auto-instrumentation (Java, Python, Node.js), SDK and m...

OTLP explained: understanding the OpenTelemetry protocol

The OTLP protocol explained simply. Understand the differences between gRPC and HTTP for exportin...

Profiles, OpenTelemetry's fourth signal: continuous profiling and correlation with traces

Understand OpenTelemetry's new profile signal: continuous profiling, flame graphs, data model and...

OpenTelemetry and Dynatrace: OTLP, collector and instrumentation

Integrate OpenTelemetry with Dynatrace: OTLP endpoint and tokens, Dynatrace OTel Collector, trace...

Correlating traces, metrics, logs and profiles with OpenTelemetry

Link the four signals to diagnose quickly: shared resource, trace_id in logs, exemplars on metric...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!