Files
agentic-dev/docs/library-decisions/2026-05-14-@opentelemetry/sdk-logs.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.5 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/sdk-logs ^0.55.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/sdk-logs license
npm view @opentelemetry/sdk-logs version
pnpm audit --audit-level=moderate

Filter: license

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

Filter: types

@opentelemetry/sdk-logs 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 0.55.x line is current and tracks the OTel JS SDK release cycle. The Logs signal is in active specification development within CNCF.

Filter: boundary-fit

ADR-017 §8 restricts @opentelemetry/sdk-logs to **/instrumentation/otel/** and app init paths. LoggerProvider and SimpleLogRecordProcessor / BatchLogRecordProcessor are configured exclusively in core-shared/instrumentation/otel/init-otel-server-node.ts. Feature packages use only @opentelemetry/api-logs (the stable API), never the SDK directly.

Filter: shadow-check

@opentelemetry/sdk-logs is the OTel Logs SDK implementation. No competing log pipeline SDK is present in the workspace.

Filter: eu-residency

@opentelemetry/sdk-logs is the log pipeline infrastructure with no independent data transmission. All log records it processes are forwarded through the configured exporter (Sentry via @sentry/opentelemetry). EU residency is governed by the exporter's DSN configuration.

Filter: cve-scan

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

Filter: named-consumer

packages/core-shared/src/instrumentation/otel/init-otel-server-node.ts instantiates LoggerProvider and registers PiiScrubLogRecordProcessor followed by SentryLogRecordProcessor from @sentry/opentelemetry. The PII scrub processor runs before the Sentry exporter (ADR-017 §7).

Prompt: replaces

The former SentryLogger which called Sentry SDK's captureException and breadcrumb APIs directly. @opentelemetry/sdk-logs provides the pipeline infrastructure that decouples log emission from the backend exporter.

Prompt: migration-cost-out

Hard. @opentelemetry/sdk-logs is the log pipeline backbone. Removing it requires replacing the entire log processing chain — provider, processors, and exporter wiring — in core-shared. The ILogger boundary (ADR-014) isolates feature packages, but the core log pipeline is non-trivially coupled to the OTel SDK.

Prompt: alternatives-considered

  1. Winston + transport — A well-established Node.js logger with pluggable transports. Rejected in ADR-017: separate pipeline from traces means no automatic span-log correlation; correlation requires manual trace ID injection into every log message.
  2. Pino — High-performance JSON logger. Same rejection reason as Winston: separate pipeline, no automatic context propagation from OTel spans.

See ADR-017 for the full decision rationale.