← All notes

Attach OpenTelemetry resource attributes to the entity that emits telemetry

Answer: A resource represents the entity producing telemetry, recorded as resource attributes. You attach it to a TracerProvider or MetricProvider at initialization. That association cannot be changed later.

What goes on a resource

A process running in a container on Kubernetes might include a process name, a pod name, a namespace, and a deployment name. All four of those attributes can be included in the resource. Backends can use that data to narrow latency or errors to one container, pod, or deployment. SDKs also add telemetry.sdk.name, telemetry.sdk.language, and telemetry.sdk.version.

| service.name | OTEL_SERVICE_NAME | |---|---| | service.name | logical name of the service | | unknown_service | SDK default if you do not set service.name | | OTEL_SERVICE_NAME | environment variable for service.name | | detectors | OS, host, process, container, Kubernetes, cloud |

SDK rules

The SDK must allow creation of Resources and association with telemetry. After a resource is added, spans and metrics from a Tracer or Meter on that provider carry it. Set service.name explicitly, in code or with OTEL_SERVICE_NAME. Most language SDKs ship detectors that fill resource information from the environment.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenTelemetry, Resources; open-telemetry/opentelemetry-specification, Resource SDK. CC-BY-4.0; Apache-2.0. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: OpenTelemetry, Resources; open-telemetry/opentelemetry-specification, Resource SDK. CC-BY-4.0; Apache-2.0.

Cite this

Permanent ID: iil:note:z4erz8r4

iinventedlight. 2026. "Attach OpenTelemetry resource attributes to the entity that emits telemetry." iinventedlight Library, iil:note:z4erz8r4, version of 2026-11-20. https://iinventedlight.com/library/notes/otel-resources/. License: CC-BY-4.0.

@misc{iil_note_z4erz8r4,
  author = {{iinventedlight}},
  title = {{Attach OpenTelemetry resource attributes to the entity that emits telemetry}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-20},
  url = {https://iinventedlight.com/library/notes/otel-resources/},
  note = {Permanent ID iil:note:z4erz8r4. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/otel-resources.md.