@sentry/opentelemetry 10.73.0 → 10.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/{asyncContextStrategy-volGaYqZ.js → asyncContextStrategy-BJ5buq_A.js} +8 -1
- package/build/cjs/{asyncContextStrategy-volGaYqZ.js.map → asyncContextStrategy-BJ5buq_A.js.map} +1 -1
- package/build/cjs/index.browser.js +1 -1
- package/build/cjs/index.js +1 -1
- package/build/esm/{asyncContextStrategy-jD8YWNDU.js → asyncContextStrategy-Bx5F5tCX.js} +9 -2
- package/build/esm/{asyncContextStrategy-jD8YWNDU.js.map → asyncContextStrategy-Bx5F5tCX.js.map} +1 -1
- package/build/esm/index.browser.js +1 -1
- package/build/esm/index.js +2 -2
- package/build/esm/package.json +1 -1
- package/build/types/asyncContextStrategy.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const core = require('@sentry/core');
|
|
4
|
-
const asyncContextStrategy = require('./asyncContextStrategy-
|
|
4
|
+
const asyncContextStrategy = require('./asyncContextStrategy-BJ5buq_A.js');
|
|
5
5
|
|
|
6
6
|
class SentryAsyncLocalStorageContextManager {
|
|
7
7
|
constructor() {
|
package/build/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
|
-
const asyncContextStrategy = require('./asyncContextStrategy-
|
|
3
|
+
const asyncContextStrategy = require('./asyncContextStrategy-BJ5buq_A.js');
|
|
4
4
|
const core = require('@sentry/core');
|
|
5
5
|
const api = require('@opentelemetry/api');
|
|
6
6
|
const node_async_hooks = require('node:async_hooks');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as api from '@opentelemetry/api';
|
|
2
2
|
import { trace, SpanKind, createContextKey, TraceFlags, propagation, INVALID_TRACEID, context, SpanStatusCode, ROOT_CONTEXT, isSpanContextValid } from '@opentelemetry/api';
|
|
3
|
-
import { isObjectLike, parseUrl, getSanitizedUrlString, SDK_VERSION, derefWeakRef, addNonEnumerableProperty, makeWeakRef, isSentryRequestUrl, getClient, getRootSpan, spanIsIgnored, hasSpansEnabled, spanIsSentrySpan, spanIsSampled, baggageHeaderToDynamicSamplingContext, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, stripUrlQueryAndFragment, dynamicSamplingContextToSentryBaggageHeader, LRUMap, debug, shouldPropagateTraceForUrl, parseBaggageHeader, SENTRY_BAGGAGE_KEY_PREFIX, generateSentryTraceHeader, generateTraceparentHeader, getDynamicSamplingContextFromSpan, getCurrentScope, getDynamicSamplingContextFromScope, getIsolationScope, propagationContextFromHeaders, shouldContinueTrace, spanToTraceContext, getTraceContextFromScope, generateTraceId, generateSpanId, _INTERNAL_safeMathRandom, handleCallbackErrors, getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, SPAN_STATUS_OK, _INTERNAL_safeDateNow, debounce, timedEventsToMeasurements, captureEvent, getCapturedScopesOnSpan, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, convertSpanLinksForEnvelope, getStatusMessage, spanTimeInputToSeconds, SPAN_KIND, safeSetSpanJSONAttributes, spanKindToName, hasSpanStreamingEnabled, addChildSpanToSpan, getDefaultIsolationScope, getDefaultCurrentScope, setCapturedScopesOnSpan, logSpanStart, logSpanEnd, shouldIgnoreSpan, parseSampleRate, sampleSpan, spanShouldInferOtelSource, spanSourceWasExplicitlySet, markSpanAsTracerProviderSpan, markSpanForOtelSourceInference, _INTERNAL_setSpanForScope, startNewTrace as startNewTrace$1, _INTERNAL_startInactiveSpan, withScope, SentryNonRecordingSpan, setAsyncContextStrategy } from '@sentry/core';
|
|
3
|
+
import { isObjectLike, parseUrl, getSanitizedUrlString, SDK_VERSION, derefWeakRef, addNonEnumerableProperty, makeWeakRef, isSentryRequestUrl, getClient, getRootSpan, spanIsIgnored, hasSpansEnabled, spanIsSentrySpan, spanIsSampled, baggageHeaderToDynamicSamplingContext, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME, stripUrlQueryAndFragment, dynamicSamplingContextToSentryBaggageHeader, LRUMap, debug, shouldPropagateTraceForUrl, parseBaggageHeader, SENTRY_BAGGAGE_KEY_PREFIX, generateSentryTraceHeader, generateTraceparentHeader, getDynamicSamplingContextFromSpan, getCurrentScope, getDynamicSamplingContextFromScope, getIsolationScope, propagationContextFromHeaders, shouldContinueTrace, spanToTraceContext, getTraceContextFromScope, generateTraceId, generateSpanId, _INTERNAL_safeMathRandom, handleCallbackErrors, getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, SPAN_STATUS_OK, _INTERNAL_safeDateNow, debounce, timedEventsToMeasurements, captureEvent, getCapturedScopesOnSpan, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, convertSpanLinksForEnvelope, getStatusMessage, spanTimeInputToSeconds, SPAN_KIND, safeSetSpanJSONAttributes, spanKindToName, hasSpanStreamingEnabled, addChildSpanToSpan, getDefaultIsolationScope, getDefaultCurrentScope, setCapturedScopesOnSpan, logSpanStart, logSpanEnd, shouldIgnoreSpan, parseSampleRate, sampleSpan, spanShouldInferOtelSource, spanSourceWasExplicitlySet, markSpanAsTracerProviderSpan, markSpanForOtelSourceInference, _INTERNAL_setSpanForScope, startNewTrace as startNewTrace$1, _INTERNAL_startInactiveSpan, withScope, SentryNonRecordingSpan, setAsyncContextStrategy, isContinuingTrace } from '@sentry/core';
|
|
4
4
|
import { URL_FULL, HTTP_URL, HTTP_REQUEST_METHOD, HTTP_METHOD, DB_SYSTEM_NAME, DB_SYSTEM, RPC_SERVICE, MESSAGING_SYSTEM, FAAS_TRIGGER, DB_STATEMENT, HTTP_TARGET, HTTP_ROUTE, HTTP_RESPONSE_STATUS_CODE, HTTP_STATUS_CODE, RPC_GRPC_STATUS_CODE, SENTRY_ORIGIN, SERVICE_VERSION, SERVICE_NAME } from '@sentry/conventions/attributes';
|
|
5
5
|
import { SamplingDecision } from '@opentelemetry/sdk-trace-base';
|
|
6
6
|
import { W3CBaggagePropagator, isTracingSuppressed as isTracingSuppressed$1, suppressTracing as suppressTracing$1, SDK_INFO } from '@opentelemetry/core';
|
|
@@ -1815,6 +1815,13 @@ function setOpenTelemetryContextAsyncContextStrategy(options) {
|
|
|
1815
1815
|
function withIsolationScope(callback) {
|
|
1816
1816
|
const ctx = api.context.active();
|
|
1817
1817
|
return api.context.with(ctx.setValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY, true), () => {
|
|
1818
|
+
const scope = getCurrentScope();
|
|
1819
|
+
if (!isContinuingTrace(scope.getPropagationContext())) {
|
|
1820
|
+
scope.setPropagationContext({
|
|
1821
|
+
traceId: generateTraceId(),
|
|
1822
|
+
sampleRand: _INTERNAL_safeMathRandom()
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1818
1825
|
return callback(getIsolationScope());
|
|
1819
1826
|
});
|
|
1820
1827
|
}
|
|
@@ -1854,4 +1861,4 @@ function setOpenTelemetryContextAsyncContextStrategy(options) {
|
|
|
1854
1861
|
}
|
|
1855
1862
|
|
|
1856
1863
|
export { startSpan as A, startSpanManual as B, suppressTracing as C, withActiveSpan as D, wrapClientClass as E, wrapContextManagerClass as F, wrapSamplingDecision as G, buildContextWithSentryScopes as H, SENTRY_SCOPES_CONTEXT_KEY as I, SENTRY_TRACE_STATE_CHILD_IGNORED as J, SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION as S, SentryPropagator as a, SentrySampler as b, SentrySpanProcessor as c, SentryTracerProvider as d, applyOtelSpanData as e, backfillStreamedSpanDataFromOtel as f, continueTrace as g, enhanceDscWithOpenTelemetryRootSpanName as h, getActiveSpan as i, getRequestSpanData as j, getScopesFromContext as k, getSentryResource as l, getSpanKind as m, getTraceContextForScope as n, isSentryRequestSpan as o, openTelemetrySetupCheck as p, setOpenTelemetryContextAsyncContextStrategy as q, setupEventContextTrace as r, setIsSetup as s, spanHasAttributes as t, spanHasEvents as u, spanHasKind as v, spanHasName as w, spanHasParentId as x, spanHasStatus as y, startInactiveSpan as z };
|
|
1857
|
-
//# sourceMappingURL=asyncContextStrategy-
|
|
1864
|
+
//# sourceMappingURL=asyncContextStrategy-Bx5F5tCX.js.map
|