RousselTMLEARNING

Observability

Core OpenTelemetry concepts: signals, resources, context and maturity

The essential OpenTelemetry vocabulary: the four signals, API and SDK, resource and instrumentation scope, context and propagation, OTLP, Collector, semantic conventions, OTEL_* variables and component maturity levels.

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.

Related articles

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three trade-offs, …

OpenTelemetry Collector: connectors, extensions and observing the Collector

Go further with the Collector: connectors (spanmetrics, servicegraph, count, routing, failover), extensions (…

OpenTelemetry semantic conventions (semconv): naming telemetry

Understand and apply OpenTelemetry semantic conventions: resource, HTTP, database, messaging and GenAI attrib…

Keep learning

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!