span attribute
A typed key and value recorded on a span, such as http.route="/checkout", that explains what the work did.
In more detail
Attributes keep their type in OTLP: a boolean stays a boolean and a number stays a number, so telemetry backends can filter and aggregate reliably. Unlike metric labels, attributes may hold per-request detail such as an order ID, but never secrets or personal data.
Example
{"key": "http.response.status_code", "value": {"intValue": "500"}}Related terms
- semantic conventions — OpenTelemetry's agreed names for common attributes, such as http.route and db.system, so every library records the same fact the same way.
- span — One timed operation within a trace, such as handling a request or running a query, with its start, duration and attributes.
- resource attribute — An attribute describing the thing that produced telemetry, such as the service name, version or deployment environment.
- metric label — A name and value attached to a metric, such as status="200", that splits one metric into separate series you can compare.
Taught in
- Cardinality And How It Bankrupts You — Full-Stack Observability: Metrics, Tracing & Logging
- OpenTelemetry: The Vendor Neutral Path — Full-Stack Observability: Metrics, Tracing & Logging
- Traces, Spans And Context Propagation — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging