Vigia

Aktualizacja @opentelemetry/core z 1.x do 2.x

Porównanie publicznego API @opentelemetry/core 1.30.1 i 2.11.0, obliczone automatycznie na podstawie typów TypeScript. Zmieniona sygnatura to możliwa zmiana niekompatybilna, a nie pewność.

Podsumowanie

Usunięte ścieżki importu0
Usunięte eksporty26
Zmienione sygnatury5
Usunięte składowe klas lub interfejsów3
Zmienione składowe klas lub interfejsów1
Nowo wycofane4
Zmiany wymagań (engines, zależności peer)1
Nowe eksporty7

Usunięte eksporty

importexportkindPrzed
@opentelemetry/coregetEnvfunction(): Required<ENVIRONMENT>
@opentelemetry/coreVERSIONvariable"1.30.1"
@opentelemetry/coreisWrappedfunction(func: unknown): func is ShimWrapped
@opentelemetry/coreENVIRONMENTtype{ 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/coreIdGeneratorinterfaceinterface
@opentelemetry/coreShimWrappedinterfaceinterface
@opentelemetry/corehexToBase64function(hexStr: string): string
@opentelemetry/corehexToBinaryfunction(hexStr: string): Uint8Array<ArrayBufferLike>
@opentelemetry/corebaggageUtilsvariable{ getKeyPairs: (baggage: Baggage) => string[]; serializeKeyPairs: (keyPairs: string[]) => string; parseKeyPairsIntoRecord: (value?: string | undefined) => Record<string, string>; parsePairKeyValue: (entry: string) => ParsedBaggageKeyValue | undefined; }
@opentelemetry/coreisAttributeKeyfunction(key: unknown): key is string
@opentelemetry/coreAlwaysOnSamplerclassclass
@opentelemetry/coreRAW_ENVIRONMENTtype{ [key: string]: string | number | string[] | undefined; }
@opentelemetry/coreAlwaysOffSamplerclassclass
@opentelemetry/coreTimeOriginLegacyinterfaceinterface
@opentelemetry/coreparseEnvironmentfunction(values: RAW_ENVIRONMENT): ENVIRONMENT
@opentelemetry/coreRandomIdGeneratorclassclass
@opentelemetry/coreParentBasedSamplerclassclass
@opentelemetry/coreDEFAULT_ENVIRONMENTvariableRequired<ENVIRONMENT>
@opentelemetry/coreTracesSamplerValuesenumTracesSamplerValues
@opentelemetry/coregetEnvWithoutDefaultsfunction(): ENVIRONMENT
@opentelemetry/coreInstrumentationLibraryinterfaceinterface
@opentelemetry/coreTraceIdRatioBasedSamplerclassclass
@opentelemetry/coreDEFAULT_ATTRIBUTE_COUNT_LIMITvariable128
@opentelemetry/coreDEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMITvariablenumber
@opentelemetry/coreDEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMITvariable128
@opentelemetry/coreDEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMITvariable128

Zmienione sygnatury

exportPrzedPo
@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 · otperformanceany{ 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

Usunięte składowe klas lub interfejsów

memberimportPrzed
TraceState._keys@opentelemetry/coreany
TraceState._clone@opentelemetry/coreany
TraceState._parse@opentelemetry/coreany

Zmienione składowe klas lub interfejsów

memberPrzedPo
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>

Nowo wycofane

export@deprecated
@opentelemetry/core · unrefTimerplease copy this code to your implementation instead, this function will be removed in the next major version of this package.
@opentelemetry/core · _globalThisUse globalThis directly instead.
@opentelemetry/core · getTimeOriginUse `performance.timeOrigin` directly.
@opentelemetry/core · otperformanceUse performance directly.

Zmiany wymagań (engines, zależności peer)

PrzedPo
engines.node>=14^18.19.0 || >=20.6.0
Nowe eksporty (7)
importexportkind
@opentelemetry/corehrTimeToSecondsfunction
@opentelemetry/coregetNumberFromEnvfunction
@opentelemetry/coregetStringFromEnvfunction
@opentelemetry/coregetBooleanFromEnvfunction
@opentelemetry/coregetStringListFromEnvfunction
@opentelemetry/corediagLogLevelFromStringfunction
@opentelemetry/coreparseKeyPairsIntoRecordfunction

Najczęściej zadawane pytania

Jakie są zmiany niekompatybilne przy aktualizacji @opentelemetry/core z 1 do 2?

Między @opentelemetry/core 1.30.1 a 2.11.0 Vigia znalazła 26 usuniętych eksportów, 5 zmienionych sygnatur i 4 usuniętych lub zmienionych składowych klas lub interfejsów.

Co zostało wycofane w @opentelemetry/core 2?

4 eksportów lub składowych oznaczono w @opentelemetry/core 2.11.0 jako wycofane.

Dla agentów

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