awesome-everything RU
↑ Back to the climb

Observability

OTel signals, Semantic Conventions, and the OTLP wire format

Crux Traces, metrics, and logs each have their own SDK pipeline and OTLP message shape but share the Resource and trace context. OTLP/gRPC is 50-70% smaller than JSON and is the vendor-neutral edge contract.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at middle altitude — in the sky
◷ 12 min

Your metrics backend runs on vendor-A. Your logs go to vendor-B. Your traces go to vendor-C. A request fails — and no two backends agree on the field name for the service. Cross-signal correlation is a spreadsheet exercise. OTel Semantic Conventions are the fix.

Three signals, one data model

OTel covers three signal types in stable form. Each has its own API surface, SDK pipeline, and OTLP message shape, but they share two concepts: Resource (per-emitter attributes — service.name, host.name, cloud.region, set once at service start) and Trace Context (trace_id, span_id) that lets you jump from a log line to the corresponding trace.

Traces — GA since 2021. The workhorse. Every backend speaks it. A trace is a tree of spans, each with a start time, duration, status, and attributes. The join key across services is the trace_id propagated via the W3C traceparent header.

Metrics — GA since 2023. The API supports counter, gauge, histogram, and exponential histogram (the new default for high-resolution latency, replacing fixed buckets). Metrics aggregate inside the SDK before export; the wire format carries resource-metrics batches.

Logs — API stable late 2023, SDKs stable late 2024. Bridge libraries (the “OTel log bridge” for slf4j, structlog, pino) let existing code emit OTel logs without rewrites. The wire format carries resource-logs batches with the same trace_id/span_id fields as traces.

Profiles — experimental in late 2024/2025, GA expected in 2026 as a fourth signal.

SignalGAOTLP messageCross-signal join key
Traces2021ExportTraceServiceRequesttrace_id
Metrics2023ExportMetricsServiceRequestservice.name via Resource
LogsAPI 2023 / SDK 2024ExportLogsServiceRequesttrace_id, span_id

Semantic Conventions: the shared vocabulary

Independent of the four-piece architecture, OTel publishes Semantic Conventions — a normative set of attribute names for common operations.

  • Resource: service.name, service.version, deployment.environment, host.name, cloud.region
  • HTTP: http.request.method, http.route, http.response.status_code, url.full
  • Database: db.system, db.operation, db.namespace
  • Messaging: messaging.system, messaging.destination.name, messaging.operation

These are the join keys that make metrics, logs, and traces compose. Adopting Semantic Conventions is the highest-leverage discipline in OTel — every backend’s auto-derived dashboards and every cross-team query depends on consistent population. Mature platform teams ship a per-language wrapper around the OTel SDK that pre-configures attribute extraction so it cannot be forgotten.

OTLP: the wire format that ties everything

OTLP is a protobuf-defined wire protocol with two transports:

  • OTLP/gRPC — binary protobuf over HTTP/2. Preferred. ~50-70% smaller payload than JSON, ~2-5× faster to encode. Supports streaming.
  • OTLP/HTTP — protobuf or JSON over HTTP/1.1. Exists for environments that block gRPC (some firewalls) or for browser-side telemetry.

The three OTLP service messages are ExportTraceServiceRequest, ExportMetricsServiceRequest, and ExportLogsServiceRequest. Every OTel-compatible backend exposes an OTLP endpoint. The wire format has been stable for years and evolves backward-compatibly.

The vendor-neutrality contract: if your edge (the application or its sidecar) emits OTLP, you are vendor-neutral. If your edge emits a proprietary format, you are not — even if a gateway later converts.

Why this works

Why exponential histograms? Fixed-bucket histograms (e.g., latency buckets at 0-10ms, 10-50ms, 50-100ms, 100-500ms, 500ms+) require you to pick bucket boundaries at instrumentation time. If your service’s latency distribution changes — say a slow path suddenly dominates the 1-5s range — you need to redeploy with different buckets. Exponential histograms (also called “native histograms” in Prometheus) use a logarithmic scale and dynamically adjust resolution. They give you full latency distribution without guessing bucket boundaries upfront. The OTel SDK defaults to exponential histograms for new counters.

Quiz

Which OTLP transport is preferred for service-to-Collector communication, and why?

Quiz

A team uses `http_route` (underscore) instead of `http.route` (dot) for the HTTP route attribute across their services. What breaks?

Order the steps

Order the OTel signals from most mature to least mature (by GA date):

  1. 1 Traces (GA 2021)
  2. 2 Metrics (GA 2023)
  3. 3 Logs API (GA late 2023), SDK (GA late 2024)
  4. 4 Profiles (experimental, GA expected 2026)
Recall before you leave
  1. 01
    What two shared concepts make cross-signal correlation possible in OTel?
  2. 02
    Why are Semantic Conventions the highest-leverage discipline in OTel adoption?
  3. 03
    What is the vendor-neutrality contract, and where exactly does it live?
Recap

OTel defines three stable signals — traces (GA 2021), metrics (GA 2023), logs (API stable late 2023, SDK late 2024) — each with its own SDK pipeline and OTLP message type, but all sharing the Resource concept (per-emitter attributes like service.name) and Trace Context (trace_id, span_id) for cross-signal correlation. Semantic Conventions give every attribute a normative name so dashboards, alerts, and cross-team queries compose without manual field mapping. The wire format is OTLP: protobuf over gRPC (preferred, 50-70% smaller than JSON, 2-5× faster) or HTTP (for firewalled or browser environments). Emit OTLP at the application edge and every backend choice becomes a Collector config change.

Connected lessons
appears again in202
Continue the climb ↑Auto-instrumentation and manual spans: the 80/20 of OTel
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.