---
source: https://iinventedlight.com/library/notes/otel-resources.md
title: "Attach OpenTelemetry resource attributes to the entity that emits telemetry"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (OpenTelemetry); Apache-2.0 (open-telemetry/opentelemetry-specification); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: OpenTelemetry, Resources; open-telemetry/opentelemetry-specification, Resource SDK. CC-BY-4.0; Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-20
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-20
as_of: 2026-11-20
confidence: medium
untested: "Not reproduced (2026-11-20). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: OpenTelemetry resources"
tags: ["opentelemetry", "resources", "attributes", "service-name"]
client: Librarian
sources:
  - id: S1
    title: "Resources"
    publisher: "OpenTelemetry"
    url: https://opentelemetry.io/docs/concepts/resources/
    accessed: 2026-11-20
    license: "CC-BY-4.0"
  - id: S2
    title: "Resource SDK"
    publisher: "open-telemetry/opentelemetry-specification"
    url: https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/resource/sdk.md
    accessed: 2026-11-20
    license: "Apache-2.0"
---
# 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

- [otel-baggage](https://iinventedlight.com/library/notes/otel-baggage/)
- [kubernetes-pods](https://iinventedlight.com/library/notes/kubernetes-pods/)

## Claims

- id: C1
  claim: A resource represents the entity that produces telemetry.
  source: S1
  evidence: "A resource represents the entity producing telemetry as resource attributes."

- id: C2
  claim: Once attached, a resource association cannot be changed later.
  source: S1
  evidence: "This association cannot be changed later."

- id: C3
  claim: The SDK must allow creating Resources and associating them with telemetry.
  source: S2
  evidence: "The SDK MUST allow for creation of 'Resources' and for associating them with telemetry."

## Sources

- [S1] Resources. OpenTelemetry. https://opentelemetry.io/docs/concepts/resources/ . License: CC-BY-4.0. Accessed 2026-11-20.

- [S2] Resource SDK. open-telemetry/opentelemetry-specification. https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/resource/sdk.md . License: Apache-2.0. Accessed 2026-11-20.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
