Vigia

Upgrading @opentelemetry/core from 2.x to 3.x

Comparison of the public API of @opentelemetry/core 2.12.0 and 3.1.1, computed automatically from their TypeScript types. A changed signature is a candidate for a breaking change, not a certainty.

Summary

Removed import paths0
Removed exports4
Changed signatures2
Removed class or interface members0
Changed class or interface members3
Newly deprecated2
Requirement changes (engines, peer dependencies)2
New exports7

Removed exports

importexportkindBefore
@opentelemetry/coreunrefTimerfunction(timer: number | { unref(): unknown; }): void
@opentelemetry/core_globalThisvariabletypeof globalThis
@opentelemetry/coregetTimeOriginfunction(): number
@opentelemetry/coreotperformancevariable{ now(): number; readonly timeOrigin: number; }

Changed signatures

exportBeforeAfter
@opentelemetry/core · isAttributeValue(val: unknown): val is AttributeValue(val: unknown): val is SimpleAttributeValue
@opentelemetry/core · sanitizeAttributes(attributes: unknown): Attributes(inAttributes: unknown): Attributes

Removed class or interface members

None detected.

Changed class or interface members

memberBeforeAfter
TraceState.set(key: string, value: string): TraceState(key: string, value: string): TraceState$1
TraceState.unset(key: string): TraceState(key: string): TraceState$1
TraceState.constructor(rawTraceState?: string | undefined): TraceState(rawTraceState?: string | undefined): TraceState$1

Newly deprecated

export@deprecated
@opentelemetry/core · isAttributeValueuse `isAnyValue`, or `isSimpleAttributeValue`.
@opentelemetry/core · sanitizeAttributesUse `cleanAttributes` or `cleanSimpleAttributes`.

Requirement changes (engines, peer dependencies)

BeforeAfter
engines.node^18.19.0 || >=20.6.0—
peerDependencies.@opentelemetry/api>=1.0.0 <1.10.0—
New exports (7)
importexportkind
@opentelemetry/coreisAnyValuefunction
@opentelemetry/corecleanAttributesfunction
@opentelemetry/coremaybeAddAttributefunction
@opentelemetry/coreAddAttributeDecisionenum
@opentelemetry/corecleanSimpleAttributesfunction
@opentelemetry/coreisSimpleAttributeValuefunction
@opentelemetry/coremaybeAddSimpleAttributefunction

Give your AI agent these facts

Vigia is a free MCP server: your coding agent checks versions, breaking changes and vulnerabilities before it writes code. No signup, no API key.

claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp

Add to CursorAdd to VS Code★ Star on GitHub

Any other MCP client
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

Agent skill (SKILL.md): tells the agent when to use Vigia · GitHub Action for pull requests

Frequently asked questions

What are the breaking changes when upgrading @opentelemetry/core from 2 to 3?

Between @opentelemetry/core 2.12.0 and 3.1.1, Vigia found 4 removed exports, 2 changed signatures and 3 removed or changed class or interface members.

What became deprecated in @opentelemetry/core 3?

2 exports or members are newly marked as deprecated in @opentelemetry/core 3.1.1.

For agents

GET https://vigia.coredls.cloud/v1/packages/npm/@opentelemetry/core/upgrade?from=2.12.0&to=3.1.1