unstale

npm / @opentelemetry/api

@opentelemetry/api

What changed in @opentelemetry/api 1 to 3, from its official release notes, upgrade guides and advisories. Also covers @opentelemetry/context-async-hooks, @opentelemetry/core, @opentelemetry/exporter-metrics-otlp-proto, @opentelemetry/exporter-prometheus, @opentelemetry/exporter-trace-otlp-grpc, @opentelemetry/exporter-trace-otlp-http, @opentelemetry/exporter-trace-otlp-proto, @opentelemetry/instrumentation, @opentelemetry/instrumentation-http, @opentelemetry/resources, @opentelemetry/sdk-metrics, @opentelemetry/sdk-trace, @opentelemetry/sdk-trace-base, @opentelemetry/sdk-trace-node, @opentelemetry/sdk-trace-web, @opentelemetry/semantic-conventions. Sources checked 2026-12-05.

10 breaking2 security4 deprecations9 new APIs and options2 performance9 behavior and defaults7 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

@opentelemetry/api 32 changes

Behavior and default changes 1

  • The service.instance.id semantic convention attribute is now stable.

    3.1.0release notes

Fixes and other changes 1

  • Specifies the full path for the ioreg command on Darwin and the kenv command on BSD when determining host.id.

    2.12.1, 3.1.1release notesrelease notes

@opentelemetry/api 239 changes

Breaking changes 10

  • SimpleSpanProcessor.forceFlush() now rejects when a pending export fails.

    2.10.0release notes

  • In sdk-trace, the constructor now takes an options object containing the exporter instead of the exporter as its first argument.

    2.9.0release notes

  • In sdk-trace, the constructor now takes an options object containing the exporter and selfObsMeterProvider.

    2.9.0release notes

  • The limit is now enforced for event attributes.

    2.6.1release notes

  • The limit is now enforced for link attributes.

    2.6.1release notes

  • The limit is now enforced for event and link attributes.

    2.6.1release notes

  • The limit is now enforced for links.

    2.6.1release notes

  • Parsing now ignores the entire environment variable if any entry is invalid. Double-quotes remain part of values; encode leading or trailing whitespace with percent-encoding.

    2.6.0release notes

  • Corrected the overly broad type for otperformance, catching incompatible uses at compile time; use the target platform's performance implementation if affected.

    2.2.0release notes

  • The minimum supported TypeScript version is 5.0.4; older versions are no longer supported.

    2.0.0release notes

Security 2

Deprecations 4

  • The Jaeger propagator is deprecated in favor of W3CTraceContextPropagator; the package is planned for removal in SDK 3.x, approximately September 2026.

    2.10.0release notes

  • The package is planned for removal in SDK 3.x, approximately September 2026, following deprecation of OpenTracing compatibility requirements in the OpenTelemetry specification.

    2.9.0release notes

  • The TraceState implementation in api is deprecated.

    2.7.1release notes

  • AsyncHooksContextManager is deprecated.

    2.5.0release notes

New APIs and options 9

  • AsyncLocalStorageContextManager implements attach(), using AsyncLocalStorage.withScope() on Node.js 25.9+ and a manual disposable wrapper with enterWith() on older Node.js.

    2.11.0release notes

  • The force flush timeout can be configured per call.

    2.11.0release notes

  • Exporter metrics are implemented.

    2.10.0release notes

  • Log processor metrics are implemented.

    2.10.0release notes

  • Adds AlwaysRecordSampler to the trace SDK.

    2.9.0release notes

  • Adds a Trace SDK package without environment variable configuration handling; it is intended to eventually replace sdk-trace-base, sdk-trace-node, and sdk-trace-web.

    2.9.0release notes

  • Adds the maxExportBatchSize option to configure the maximum export batch size.

    2.9.0release notes

  • Implements metrics for span processors.

    2.9.0release notes

  • Span start/end metrics are implemented.

    2.6.0release notes

Performance 2

  • The method's performance is optimized.

    2.6.1release notes

  • The method avoids Object.entries, improving performance.

    2.6.1release notes

Behavior and default changes 6

  • Concurrent forceFlush calls await ongoing exports and reuse a fresh concurrent export cycle, avoiding duplicate collection and export cycles.

    2.9.0release notes

  • set now returns the same TraceState instance when the key/value are invalid or make the whole trace state invalid.

    2.7.1release notes

  • unset now returns the same TraceState instance when the key is not present.

    2.7.1release notes

  • When best-effort parsing encounters duplicate keys, the most recent value wins.

    2.7.1release notes

  • The custom value from the environment variable for service.instance.id now takes priority over the random UUID backup.

    2.5.1release notes

  • A runtime check is used for the default service name.

    2.5.0release notes

Fixes and other changes 6

  • Exponential histograms now ignore Infinity.

    2.11.0release notes

  • Multiple calls to serviceInstanceIdDetector.detect() now return the same value for service.instance.id.

    2.11.0release notes

  • The sampler now includes trace IDs at the ratio 1 upper bound.

    2.10.0release notes

  • Warning logs are no longer shown when a module is not marked as loaded.

    2.6.1release notes

  • The export avoids DOM types, improving compatibility in environments without DOM types.

    2.4.0release notes

  • Constructor input validation is improved, helping catch invalid inputs.

    2.4.0release notes

@opentelemetry/api 12 changes

Behavior and default changes 2

  • API versions are considered compatible using a semver check rather than requiring an exact match.

    1.0.0release notes

  • The Metrics API is stable and generally available.

    1.0.0release notes