Packages

@opentelemetry/api

1.10.0 · 20 Oct 2026Apache-2.0157.7M / weekRepositoryHomepagenpmAtom feed

Your version

1.10.0

Latest20 Oct 2026Where it was published

In short

3 new1 faster2 fixed3 internal

Release note

:rocket: Features

  • api: Integrate the Logs API into @opentelemetry/api #4862

  • api: Add imperative context.attach() for setting context across callback boundaries that with() cannot wrap. #6845

    • attach() returns a Token whose dispose() method restores the previous context. Use token.dispose() to detach.

    • attach is an optional method on the ContextManager interface; when the active context manager does not implement it, context.attach() logs a warning and returns a no-op token.

  • api: Add AnyValue type (of type unknown) and extend Attributes type values to use AnyValue #6780

    • This is part of supporting OTEP 4485.

    • This is a breaking change for SDK implementations, in that they may need to support more attribute types for any APIs that accept Attributes or AnyValue. Implementors should refer to the OTEP 4485 link above for "MUST / SHOULD" requirements for complex attributes handling. See also the attributes-handling utilities provided by @opentelemetry/core to help. For example, cleanSimpleAttributes() can be used to limit user-provided attributes to the set of value types supported in earlier @opentelemetry/api versions.

    • This change is typically not a breaking change for users of @opentelemetry/api. There is one possible breaking case: If a TypeScript user was using the Attributes type in their own code and using TypeScript Narrowing to reduce an attribute value to an expected type (example here). It is expected that this usage should be rare and, likely, limited to SDK implementations, if at all. (If this impacted your code, please let us know.)

    • Note for users of attributes: Simple attributes SHOULD be used whenever possible. Instrumentations SHOULD assume that backends do not index individual properties of complex attributes, that querying or aggregating on such properties is inefficient and complicated, and that reporting complex attributes carries higher performance overhead.

:bug: Bug Fixes

  • api: Cap tracestate list-members and total length in the deprecated TraceState.set() so it stays in step with TraceState from @opentelemetry/core #6964

  • Resolve the ESM build through the default export condition instead of import, so a resolver that activates neither import nor require still finds an entry point #7132

:house: Internal

  • api: Add getGlobal fast-path #6956

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.