OpenTelemetry collects telemetry: data that describes what your software is doing. That data is organised into signals — traces, metrics and logs, with profiles being developed — plus shared context such as resources and attributes. This guide explains each, with examples of what actually gets recorded.
Key takeaways
- Signals: traces (spans), metrics, logs — profiles are in development.
- Resources describe the source; attributes describe the details.
- Context propagation links signals across services.
- Use the Collector to redact sensitive attributes before export.
Traces and spans
A trace represents one operation — usually a request — as it moves through a system. It is made of spans. Each span records:
- A name (for example
GET /orders/{id}) and kind (server, client, producer, consumer, internal). - Start and end timestamps, and so its duration.
- Trace ID, span ID and parent span ID.
- Attributes such as HTTP method, status code or database system.
- Events (timestamped notes such as an exception) and a status (OK or error).
- Links to related spans in other traces.
Metrics
Metrics are numeric measurements aggregated over time. OpenTelemetry defines instruments including counters (always increasing, such as requests served), up-down counters (such as active connections), gauges (current values, such as temperature or memory) and histograms (distributions, such as request latency). Each data point carries attributes so you can break results down, for example by route or status code.
Logs
A log record has a timestamp, severity, body and attributes. OpenTelemetry mainly integrates with existing logging libraries through log bridges or appenders, then adds trace and span IDs so logs can be correlated with requests. Log support is Stable in some SDKs (such as Java, .NET, C++ and PHP) and still in Development in others (such as Python and JavaScript) per the official status table.
Profiles (in development)
Profiling — which functions use CPU or memory — is being added as a fourth signal. The Java SDK lists profiles as Development, and an eBPF profiler distribution of the Collector exists. Treat it as early-stage.
Resources and attributes
Every signal carries a resource describing what produced it: service.name, service.version, host name, container ID, cloud region, Kubernetes pod and so on. Resource detectors fill many of these automatically. Attribute names follow semantic conventions so that data from different languages matches.
Context and baggage
Context propagation carries the trace context across process boundaries, usually in the W3C traceparent HTTP header. Baggage lets you pass extra key-value pairs (such as a tenant ID) alongside it. Baggage travels in headers to downstream services, so never put secrets in it.
What auto-instrumentation records by default
Zero-code instrumentation typically captures inbound and outbound HTTP and gRPC calls, database queries, messaging operations and runtime metrics, depending on the libraries you use. It records structure and timing, but it does not know your business concepts — add manual spans or attributes for things like order IDs or plan tiers.
Example: one request, three signals
Imagine a user places an order. The frontend span records POST /orders taking 412 ms with status 201. Child spans show 88 ms in the auth service, 214 ms in the cart service and 104 ms in a database query. At the same time, a histogram metric records the request duration under the route /orders, and a counter increases orders.placed. A log line saying "payment retry attempt=2" carries the same trace ID. In a backend, those three views of one event can be connected with a click — which is the whole point of collecting them together.
Controlling how much is collected
More data is not always better. Sampling keeps a representative share of traces — head sampling decides at the start of a request, while tail sampling in a Collector gateway can keep every error and slow trace. For metrics, limit attribute values to bounded sets. For logs, set severity levels per environment. These choices keep costs predictable without losing the signals you need for debugging.
Controlling sensitive data
Telemetry can accidentally include personal data: URLs with emails, SQL with values, headers with tokens. Good practice:
- Review which attributes your instrumentation records.
- Use Collector processors to delete, hash or redact attributes before export.
- Avoid capturing request and response bodies unless needed.
- Set retention and access policies in your backend.
Frequently asked questions
Does OpenTelemetry collect personal data?
Only what your instrumentation records. URLs, headers or queries can contain personal data, so review and redact before exporting.
Does OpenTelemetry collect data about my users' browsers?
Only if you add browser or client instrumentation. Server-side SDKs record what happens in your services.
Where is collected data stored?
OpenTelemetry does not store it. Data is exported to the backend you configure.
Get OpenTelemetry from the official source
Free and open source (Apache 2.0) — the Go source .zip downloads straight from GitHub.
Downloads the OpenTelemetry Go source code (.zip, main branch) from the official GitHub repository — you stay on this page.