LinuxXLVI · OpenTelemetryOTel three pillars
OpenTelemetry three pillars - metrics, logs, traces
What you'll learn
- Define metrics, logs, and traces
- Explain how OTel unifies them
- Choose the right pillar for the question
- Recognise OTel components
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
OpenTelemetry (OTel) is the standard for observability. It unifies metrics, logs, and traces under one framework. This lesson covers the three pillars and the OTel components.
The three pillars
| Pillar | Question | Example |
|---|---|---|
| Metrics | How much? How many? | CPU 80%, requests/sec |
| Logs | What happened? | “Error: timeout connecting to db” |
| Traces | Where did the time go? | A request took 500ms; 200ms in DB, 100ms in auth |
Each pillar answers a different question:
- Metrics for aggregate behaviour and alerts.
- Logs for events and debugging.
- Traces for latency analysis across services.
Why unify?
Historically, three separate systems:
- Prometheus for metrics.
- ELK / Loki for logs.
- Jaeger / Zipkin for traces.
Each has its own agent, format, and query language. Switching between them is manual.
OTel unifies them:
- One agent (the OTel Collector) ingests all three.
- One schema (OpenTelemetry Protocol, OTLP) for transport.
- One set of tools for visualisation (Grafana, Honeycomb, Lightstep).
OpenTelemetry components
- OTel SDK: library for applications to emit metrics/logs/traces.
- OTel Collector: receives OTLP, processes, exports to backends.
- OTel Protocol (OTLP): the wire format.
- Auto-instrumentation: agents that auto-instrument common libraries (Java, Python, Node, etc.).
Pillar-specific details
Metrics
- Counters, gauges, histograms.
- Used for: aggregate behaviour, alerting, capacity planning.
- Backend: Prometheus, Datadog, New Relic, etc.
Logs
- Structured events with attributes.
- Used for: debugging, event correlation, audit.
- Backend: Loki, Elasticsearch, Splunk, etc.
Traces
- Spans representing units of work.
- A trace is a tree of spans (e.g. one HTTP request → multiple service calls).
- Used for: latency analysis, dependency mapping.
- Backend: Jaeger, Tempo, Zipkin, Honeycomb.
OTel data model
A common data model across pillars:
- Resource: the entity (host, service, container).
- Attribute: a key-value (e.g.
http.method=GET). - Event: a log record.
- Span: a unit of work in a trace.
- Metric data point: a measurement.
All have a resource, attributes, and a timestamp. The schema is consistent across pillars.
OTel Collector
The Collector is the workhorse:
# /etc/otel-collector/config.yaml
receivers:
otlp:
protocols:
grpc:
http:
processors:
batch:
exporters:
prometheus:
endpoint: 0.0.0.0:8889
loki:
endpoint: http://loki:3100/loki/api/v1/push
jaeger:
endpoint: jaeger:14250
service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch]
exporters: [prometheus]
logs:
receivers: [otlp]
processors: [batch]
exporters: [loki]
traces:
receivers: [otlp]
processors: [batch]
exporters: [jaeger]
One Collector, multiple pipelines, multiple backends.
Knowledge check
Knowledge check · 3 questions
Q1. What does OTel standardise?
Q2. OpenTelemetry replaces Prometheus and Loki.
Q3. Which of the following are OpenTelemetry components? Select all that apply.
Passing score: 75%. Answers are checked in this browser.