Telemetry attribute

A key-value fact attached to telemetry, such as service, route, or release, that lets you filter and group the data later.

telemetery attributeextra fields on my tracestags on spanslabels I can filter logs bywhat am I supposed to name the service fieldwhy can I group this chart by environmentwhy can I filter by service but not by regionthe extra context next to a metric

See it

Live demo coming soon

What it is

A telemetry attribute is a key-value fact attached to a signal, such as service.name='checkout', http.request.method='POST', or deployment.environment.name='production'. The value is not the event or measurement itself. It is the context that lets a backend filter, group, and aggregate many signals into an answer. OpenTelemetry semantic conventions standardize common names so every service does not invent its own dialect.

Reach for attributes when you know how you will slice the data later: by service, route, status class, region, release, or tenant. Put facts that describe the whole process on the OpenTelemetry Resource, and facts about one operation on its span, log record, or metric data point.

Gotcha: useful context can become expensive or dangerous context. An unbounded value such as user ID, raw URL, or request ID creates high-cardinality metric series, and email addresses or tokens turn telemetry into sensitive data. Use the semantic convention name, keep metric dimensions bounded, and redact before export.

Ask AI for it

Apply OpenTelemetry semantic conventions across this service. Set service.name, service.version, and deployment.environment.name on the Resource, then attach bounded attributes such as http.request.method, http.route, server.address, and http.response.status_code to spans and logs. Allow only route, method, status class, and region on metrics. Reject raw URLs, request IDs, user IDs, email addresses, authorization headers, and tokens from metric attributes, and add an OpenTelemetry Collector attributes processor that deletes sensitive fields before export.

You might have meant

telemetryopentelemetryhigh cardinalityspanstructured logging

Go deeper