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 paths | 0 |
|---|---|
| Removed exports | 4 |
| Changed signatures | 2 |
| Removed class or interface members | 0 |
| Changed class or interface members | 3 |
| Newly deprecated | 2 |
| Requirement changes (engines, peer dependencies) | 2 |
| New exports | 7 |
Removed exports
| import | export | kind | Before |
|---|---|---|---|
@opentelemetry/core | unrefTimer | function | (timer: number | { unref(): unknown; }): void |
@opentelemetry/core | _globalThis | variable | typeof globalThis |
@opentelemetry/core | getTimeOrigin | function | (): number |
@opentelemetry/core | otperformance | variable | { now(): number; readonly timeOrigin: number; } |
Changed signatures
| export | Before | After |
|---|---|---|
@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
| member | Before | After |
|---|---|---|
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 · isAttributeValue | use `isAnyValue`, or `isSimpleAttributeValue`. |
@opentelemetry/core · sanitizeAttributes | Use `cleanAttributes` or `cleanSimpleAttributes`. |
Requirement changes (engines, peer dependencies)
| Before | After | |
|---|---|---|
engines.node | ^18.19.0 || >=20.6.0 | — |
peerDependencies.@opentelemetry/api | >=1.0.0 <1.10.0 | — |
New exports (7)
| import | export | kind |
|---|---|---|
@opentelemetry/core | isAnyValue | function |
@opentelemetry/core | cleanAttributes | function |
@opentelemetry/core | maybeAddAttribute | function |
@opentelemetry/core | AddAttributeDecision | enum |
@opentelemetry/core | cleanSimpleAttributes | function |
@opentelemetry/core | isSimpleAttributeValue | function |
@opentelemetry/core | maybeAddSimpleAttribute | function |
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