Files
agentic-dev/docs/library-decisions/2026-05-14-@opentelemetry/resources.md
Danijel Martinek f77e6ea881 chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2026-07-12 20:40:54 +02:00

3.2 KiB

package, version, tier, decision, date, deciders, adr, filter-results, verification-commands, accepted-cves
package version tier decision date deciders adr filter-results verification-commands accepted-cves
@opentelemetry/resources ^1.27.0 core approved 2026-05-14
Danijel Martinek
adr-017
license types maintenance boundary-fit shadow-check eu-residency cve-scan named-consumer socketRisk
Apache-2.0 native active pass pass n/a clean pass clean
npm view @opentelemetry/resources license
npm view @opentelemetry/resources version
pnpm audit --audit-level=moderate

Filter: license

npm view @opentelemetry/resources license returns Apache-2.0. Apache-2.0 is on the allowlist.

Filter: types

@opentelemetry/resources is authored in TypeScript and ships its own .d.ts declaration files. No separate @types/ package is needed.

Filter: maintenance

Actively maintained by the OpenTelemetry community. The 1.27.x line is on the stable 1.x track and receives regular releases. Stable versioning reflects the maturity of the resources specification.

Filter: boundary-fit

ADR-017 §8 restricts @opentelemetry/resources to **/instrumentation/otel/** and app init paths. The Resource class is used in initOtelServerNode to attach service name, version, and environment attributes to all telemetry signals. Feature packages never import it directly.

Filter: shadow-check

@opentelemetry/resources is the standard OTel resource detection package. No competing resource attribution mechanism is present in the workspace.

Filter: eu-residency

@opentelemetry/resources is a pure configuration package that attaches static metadata to telemetry signals. It has no network communication or data transmission. EU residency does not apply.

Filter: cve-scan

pnpm audit --audit-level=moderate reports no advisories against @opentelemetry/resources at the time of this trace.

Filter: named-consumer

packages/core-shared/src/instrumentation/otel/init-otel-server-node.ts uses Resource to tag all OTel signals with service.name, service.version, and deployment.environment attributes, enabling filtering by service in Sentry and future backends.

Prompt: replaces

Manual tag propagation that would otherwise require attaching service metadata to every span and log record individually. Resource is set once at SDK init time and propagates to all signals automatically.

Prompt: migration-cost-out

Low. @opentelemetry/resources is used in one SDK init file. Removing it means losing automatic service metadata on signals — signals would still be emitted but lose service.name attribution unless manually added to each span.

Prompt: alternatives-considered

  1. Manual span attributes — Set service.name on every startSpan() call. Rejected: error-prone at scale; resources are a first-class OTel concept designed for this exact purpose.
  2. Sentry release/environment config — Sentry SDK accepts release and environment directly. Rejected: Sentry-specific; OTel Resource is the vendor-neutral mechanism that works with any exporter.

See ADR-017 for the full decision rationale.