@opentelemetry/core을(를) 1.x에서 2.x로 업그레이드하기
@opentelemetry/core 1.30.1과 2.11.0의 공개 API를 TypeScript 타입에서 자동으로 비교한 결과입니다. 시그니처 변경은 호환성이 깨질 가능성이 있다는 뜻이며 확정은 아닙니다.
요약
| 삭제된 import 경로 | 0 |
|---|---|
| 삭제된 export | 26 |
| 변경된 시그니처 | 5 |
| 삭제된 클래스·인터페이스 멤버 | 3 |
| 변경된 클래스·인터페이스 멤버 | 1 |
| 새로 지원 중단됨 | 4 |
| 요구 사항 변경 (engines, peer 의존성) | 1 |
| 새 export | 7 |
삭제된 export
| import | export | kind | 이전 |
|---|---|---|---|
@opentelemetry/core | getEnv | function | (): Required<ENVIRONMENT> |
@opentelemetry/core | VERSION | variable | "1.30.1" |
@opentelemetry/core | isWrapped | function | (func: unknown): func is ShimWrapped |
@opentelemetry/core | ENVIRONMENT | type | { CONTAINER_NAME?: string | undefined; ECS_CONTAINER_METADATA_URI_V4?: string | undefined; ECS_CONTAINER_METADATA_URI?: string | undefined; HOSTNAME?: string | undefined; KUBERNETES_SERVICE_HOST?: string | undefined; NAMESPACE?: string | undefined; OTEL_EXPORTER_JAEGER_AGENT_HOST?: string | undefined; OTEL_EXPORTER_JAEGER_ENDPOINT?: string | undefined; OTEL_EXPORTER_JAEGER_PASSWORD?: string | undefined; OTEL_EXPORTER_JAEGER_USER?: string | undefined; OTEL_EXPORTER_OTLP_ENDPOINT?: string | undefined; OTEL_EXPORTER_OTLP_TRACES_ENDPOINT?: string | undefined; OTEL_EXPORTER_OTLP_METRICS_ENDPOINT?: … |
@opentelemetry/core | IdGenerator | interface | interface |
@opentelemetry/core | ShimWrapped | interface | interface |
@opentelemetry/core | hexToBase64 | function | (hexStr: string): string |
@opentelemetry/core | hexToBinary | function | (hexStr: string): Uint8Array<ArrayBufferLike> |
@opentelemetry/core | baggageUtils | variable | { getKeyPairs: (baggage: Baggage) => string[]; serializeKeyPairs: (keyPairs: string[]) => string; parseKeyPairsIntoRecord: (value?: string | undefined) => Record<string, string>; parsePairKeyValue: (entry: string) => ParsedBaggageKeyValue | undefined; } |
@opentelemetry/core | isAttributeKey | function | (key: unknown): key is string |
@opentelemetry/core | AlwaysOnSampler | class | class |
@opentelemetry/core | RAW_ENVIRONMENT | type | { [key: string]: string | number | string[] | undefined; } |
@opentelemetry/core | AlwaysOffSampler | class | class |
@opentelemetry/core | TimeOriginLegacy | interface | interface |
@opentelemetry/core | parseEnvironment | function | (values: RAW_ENVIRONMENT): ENVIRONMENT |
@opentelemetry/core | RandomIdGenerator | class | class |
@opentelemetry/core | ParentBasedSampler | class | class |
@opentelemetry/core | DEFAULT_ENVIRONMENT | variable | Required<ENVIRONMENT> |
@opentelemetry/core | TracesSamplerValues | enum | TracesSamplerValues |
@opentelemetry/core | getEnvWithoutDefaults | function | (): ENVIRONMENT |
@opentelemetry/core | InstrumentationLibrary | interface | interface |
@opentelemetry/core | TraceIdRatioBasedSampler | class | class |
@opentelemetry/core | DEFAULT_ATTRIBUTE_COUNT_LIMIT | variable | 128 |
@opentelemetry/core | DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT | variable | number |
@opentelemetry/core | DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT | variable | 128 |
@opentelemetry/core | DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT | variable | 128 |
변경된 시그니처
| export | 이전 | 이후 |
|---|---|---|
@opentelemetry/core · SDK_INFO | { "telemetry.sdk.name": string; "process.runtime.name": string; "telemetry.sdk.language": string; "telemetry.sdk.version": string; } | { "telemetry.sdk.name": string; "process.runtime.name": string; "telemetry.sdk.language": "nodejs"; "telemetry.sdk.version": string; } |
@opentelemetry/core · unrefTimer | (timer: NodeJS.Timer): void | (timer: number | { unref(): unknown; }): void |
@opentelemetry/core · otperformance | any | { now(): number; readonly timeOrigin: number; } |
@opentelemetry/core · isAttributeValue | (val: unknown): val is SpanAttributeValue | (val: unknown): val is AttributeValue |
@opentelemetry/core · sanitizeAttributes | (attributes: unknown): SpanAttributes | (attributes: unknown): Attributes |
삭제된 클래스·인터페이스 멤버
| member | import | 이전 |
|---|---|---|
TraceState._keys | @opentelemetry/core | any |
TraceState._clone | @opentelemetry/core | any |
TraceState._parse | @opentelemetry/core | any |
변경된 클래스·인터페이스 멤버
| member | 이전 | 이후 |
|---|---|---|
BindOnceFuture.constructor | <R, This = unknown, T extends (this: This, ...args: unknown[]) => R = () => R>(_callback: T, _that: This): BindOnceFuture<R, This, T> | <R, This = unknown, T extends (this: This, ...args: unknown[]) => R = () => R>(callback: T, that: This): BindOnceFuture<R, This, T> |
새로 지원 중단됨
| export | @deprecated |
|---|---|
@opentelemetry/core · unrefTimer | please copy this code to your implementation instead, this function will be removed in the next major version of this package. |
@opentelemetry/core · _globalThis | Use globalThis directly instead. |
@opentelemetry/core · getTimeOrigin | Use `performance.timeOrigin` directly. |
@opentelemetry/core · otperformance | Use performance directly. |
요구 사항 변경 (engines, peer 의존성)
| 이전 | 이후 | |
|---|---|---|
engines.node | >=14 | ^18.19.0 || >=20.6.0 |
새 export (7)
| import | export | kind |
|---|---|---|
@opentelemetry/core | hrTimeToSeconds | function |
@opentelemetry/core | getNumberFromEnv | function |
@opentelemetry/core | getStringFromEnv | function |
@opentelemetry/core | getBooleanFromEnv | function |
@opentelemetry/core | getStringListFromEnv | function |
@opentelemetry/core | diagLogLevelFromString | function |
@opentelemetry/core | parseKeyPairsIntoRecord | function |
자주 묻는 질문
@opentelemetry/core을(를) 1에서 2(으)로 업그레이드할 때 호환성이 깨지는 변경은 무엇인가요?
@opentelemetry/core 1.30.1과 2.11.0 사이에서 Vigia는 삭제된 export 26개, 변경된 시그니처 5개, 삭제되거나 변경된 클래스·인터페이스 멤버 4개를 찾았습니다.
@opentelemetry/core 2에서 지원 중단된 것은 무엇인가요?
@opentelemetry/core 2.11.0에서 export 또는 멤버 4개가 새로 지원 중단으로 표시되었습니다.
에이전트용
GET https://vigia.coredls.cloud/v1/packages/npm/@opentelemetry/core/upgrade?from=1.30.1&to=2.11.0