Vigia

@opentelemetry/core को 1.x से 2.x पर अपग्रेड करना

@opentelemetry/core 1.30.1 और 2.12.0 के सार्वजनिक API की तुलना, उनके TypeScript टाइप से अपने-आप निकाली गई। बदला हुआ सिग्नेचर संभावित असंगत बदलाव है, निश्चितता नहीं।

सारांश

हटाए गए इम्पोर्ट पाथ0
हटाए गए एक्सपोर्ट26
बदले गए सिग्नेचर5
क्लास या इंटरफ़ेस के हटाए गए सदस्य3
क्लास या इंटरफ़ेस के बदले गए सदस्य1
नए डिप्रिकेटेड4
आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)1
नए एक्सपोर्ट7

हटाए गए एक्सपोर्ट

importexportkindपहले
@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

बदले गए सिग्नेचर

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

क्लास या इंटरफ़ेस के हटाए गए सदस्य

memberimportपहले
TraceState._keys@opentelemetry/coreany
TraceState._clone@opentelemetry/coreany
TraceState._parse@opentelemetry/coreany

क्लास या इंटरफ़ेस के बदले गए सदस्य

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 · 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.

आवश्यकताओं में बदलाव (engines, peer निर्भरताएँ)

पहलेबाद में
engines.node>=14^18.19.0 || >=20.6.0
नए एक्सपोर्ट (7)
importexportkind
@opentelemetry/corehrTimeToSecondsfunction
@opentelemetry/coregetNumberFromEnvfunction
@opentelemetry/coregetStringFromEnvfunction
@opentelemetry/coregetBooleanFromEnvfunction
@opentelemetry/coregetStringListFromEnvfunction
@opentelemetry/corediagLogLevelFromStringfunction
@opentelemetry/coreparseKeyPairsIntoRecordfunction

अपने AI एजेंट को ये तथ्य दें

Vigia एक मुफ़्त MCP सर्वर है: आपका कोडिंग एजेंट कोड लिखने से पहले वर्ज़न, ब्रेकिंग बदलाव और कमज़ोरियाँ जाँचता है। न साइनअप, न API कुंजी।

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

Cursor में जोड़ेंVS Code में जोड़ें★ GitHub पर स्टार दें

कोई भी दूसरा MCP क्लाइंट
{ "mcpServers": { "vigia": { "url": "https://vigia.coredls.cloud/mcp" } } }

एजेंट स्किल (SKILL.md): एजेंट को बताती है कि Vigia कब इस्तेमाल करना है · पुल रिक्वेस्ट के लिए GitHub Action

अक्सर पूछे जाने वाले प्रश्न

@opentelemetry/core को 1 से 2 पर अपग्रेड करने पर कौन-से असंगत बदलाव हैं?

@opentelemetry/core 1.30.1 और 2.12.0 के बीच Vigia को 26 हटाए गए एक्सपोर्ट, 5 बदले गए सिग्नेचर और 4 हटाए या बदले गए क्लास/इंटरफ़ेस सदस्य मिले।

@opentelemetry/core 2 में क्या डिप्रिकेट हुआ?

@opentelemetry/core 2.12.0 में 4 एक्सपोर्ट या सदस्य नए रूप से डिप्रिकेटेड चिह्नित हैं।

एजेंटों के लिए

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