Memperbarui @opentelemetry/core dari 2.x ke 3.x
Perbandingan API publik @opentelemetry/core 2.12.0 dan 3.1.1, dihitung otomatis dari tipe TypeScript-nya. Tanda tangan yang berubah adalah kemungkinan perubahan tidak kompatibel, bukan kepastian.
Ringkasan
| Jalur impor yang dihapus | 0 |
|---|---|
| Ekspor yang dihapus | 4 |
| Tanda tangan yang berubah | 2 |
| Anggota kelas atau antarmuka yang dihapus | 0 |
| Anggota kelas atau antarmuka yang berubah | 3 |
| Baru ditandai usang | 2 |
| Perubahan persyaratan (engines, dependensi peer) | 2 |
| Ekspor baru | 7 |
Ekspor yang dihapus
| import | export | kind | Sebelum |
|---|---|---|---|
@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; } |
Tanda tangan yang berubah
| export | Sebelum | Sesudah |
|---|---|---|
@opentelemetry/core · isAttributeValue | (val: unknown): val is AttributeValue | (val: unknown): val is SimpleAttributeValue |
@opentelemetry/core · sanitizeAttributes | (attributes: unknown): Attributes | (inAttributes: unknown): Attributes |
Anggota kelas atau antarmuka yang dihapus
Tidak ada yang terdeteksi.
Anggota kelas atau antarmuka yang berubah
| member | Sebelum | Sesudah |
|---|---|---|
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 |
Baru ditandai usang
| export | @deprecated |
|---|---|
@opentelemetry/core · isAttributeValue | use `isAnyValue`, or `isSimpleAttributeValue`. |
@opentelemetry/core · sanitizeAttributes | Use `cleanAttributes` or `cleanSimpleAttributes`. |
Perubahan persyaratan (engines, dependensi peer)
| Sebelum | Sesudah | |
|---|---|---|
engines.node | ^18.19.0 || >=20.6.0 | — |
peerDependencies.@opentelemetry/api | >=1.0.0 <1.10.0 | — |
Ekspor baru (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 |
Berikan fakta ini ke agen AI Anda
Vigia adalah server MCP gratis: agen coding Anda memeriksa versi, perubahan yang merusak kompatibilitas, dan kerentanan sebelum menulis kode. Tanpa pendaftaran, tanpa kunci API.
claude mcp add --transport http vigia https://vigia.coredls.cloud/mcp
Tambahkan ke CursorTambahkan ke VS Code★ Bintang di GitHub
Klien MCP lainnya
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }Skill agen (SKILL.md): memberi tahu agen kapan memakai Vigia · GitHub Action untuk pull request
Pertanyaan umum
Apa saja perubahan tidak kompatibel saat memperbarui @opentelemetry/core dari 2 ke 3?
Antara @opentelemetry/core 2.12.0 dan 3.1.1, Vigia menemukan 4 ekspor yang dihapus, 2 tanda tangan yang berubah, dan 3 anggota kelas atau antarmuka yang dihapus atau berubah.
Apa yang ditandai usang di @opentelemetry/core 3?
2 ekspor atau anggota baru ditandai usang di @opentelemetry/core 3.1.1.
Untuk agen
GET https://vigia.coredls.cloud/v1/packages/npm/@opentelemetry/core/upgrade?from=2.12.0&to=3.1.1