@sentry/core
Advanced tools
Comparing version 8.0.0-rc.2 to 8.0.0-rc.3
@@ -55,17 +55,20 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const span = shouldCreateSpanResult | ||
? trace.startInactiveSpan({ | ||
name: `${method} ${url}`, | ||
attributes: { | ||
url, | ||
type: 'fetch', | ||
'http.method': method, | ||
'http.url': fullUrl, | ||
'server.address': host, | ||
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, | ||
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client', | ||
}, | ||
}) | ||
: new sentryNonRecordingSpan.SentryNonRecordingSpan(); | ||
const hasParent = !!spanUtils.getActiveSpan(); | ||
const span = | ||
shouldCreateSpanResult && hasParent | ||
? trace.startInactiveSpan({ | ||
name: `${method} ${url}`, | ||
attributes: { | ||
url, | ||
type: 'fetch', | ||
'http.method': method, | ||
'http.url': fullUrl, | ||
'server.address': host, | ||
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, | ||
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client', | ||
}, | ||
}) | ||
: new sentryNonRecordingSpan.SentryNonRecordingSpan(); | ||
handlerData.fetchData.__span = span.spanContext().spanId; | ||
@@ -88,5 +91,6 @@ spans[span.spanContext().spanId] = span; | ||
options, | ||
// If performance is disabled (TWP), we do not want to use the span as base for the trace headers, | ||
// If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), | ||
// we do not want to use the span as base for the trace headers, | ||
// which means that the headers will be generated from the scope and the sampling decision is deferred | ||
hasTracingEnabled.hasTracingEnabled() ? span : undefined, | ||
hasTracingEnabled.hasTracingEnabled() && hasParent ? span : undefined, | ||
); | ||
@@ -93,0 +97,0 @@ } |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const SDK_VERSION = '8.0.0-rc.2'; | ||
const SDK_VERSION = '8.0.0-rc.3'; | ||
exports.SDK_VERSION = SDK_VERSION; | ||
//# sourceMappingURL=version.js.map |
@@ -7,3 +7,3 @@ import { parseUrl, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, isInstanceOf, BAGGAGE_HEADER_NAME } from '@sentry/utils'; | ||
import { hasTracingEnabled } from './utils/hasTracingEnabled.js'; | ||
import { spanToTraceHeader } from './utils/spanUtils.js'; | ||
import { getActiveSpan, spanToTraceHeader } from './utils/spanUtils.js'; | ||
import { SentryNonRecordingSpan } from './tracing/sentryNonRecordingSpan.js'; | ||
@@ -54,17 +54,20 @@ import { setHttpStatus, SPAN_STATUS_ERROR } from './tracing/spanstatus.js'; | ||
const span = shouldCreateSpanResult | ||
? startInactiveSpan({ | ||
name: `${method} ${url}`, | ||
attributes: { | ||
url, | ||
type: 'fetch', | ||
'http.method': method, | ||
'http.url': fullUrl, | ||
'server.address': host, | ||
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, | ||
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client', | ||
}, | ||
}) | ||
: new SentryNonRecordingSpan(); | ||
const hasParent = !!getActiveSpan(); | ||
const span = | ||
shouldCreateSpanResult && hasParent | ||
? startInactiveSpan({ | ||
name: `${method} ${url}`, | ||
attributes: { | ||
url, | ||
type: 'fetch', | ||
'http.method': method, | ||
'http.url': fullUrl, | ||
'server.address': host, | ||
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: spanOrigin, | ||
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client', | ||
}, | ||
}) | ||
: new SentryNonRecordingSpan(); | ||
handlerData.fetchData.__span = span.spanContext().spanId; | ||
@@ -87,5 +90,6 @@ spans[span.spanContext().spanId] = span; | ||
options, | ||
// If performance is disabled (TWP), we do not want to use the span as base for the trace headers, | ||
// If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction), | ||
// we do not want to use the span as base for the trace headers, | ||
// which means that the headers will be generated from the scope and the sampling decision is deferred | ||
hasTracingEnabled() ? span : undefined, | ||
hasTracingEnabled() && hasParent ? span : undefined, | ||
); | ||
@@ -92,0 +96,0 @@ } |
@@ -1,4 +0,4 @@ | ||
const SDK_VERSION = '8.0.0-rc.2'; | ||
const SDK_VERSION = '8.0.0-rc.3'; | ||
export { SDK_VERSION }; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@sentry/core", | ||
"version": "8.0.0-rc.2", | ||
"version": "8.0.0-rc.3", | ||
"description": "Base implementation for all Sentry JavaScript SDKs", | ||
@@ -45,4 +45,4 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "8.0.0-rc.2", | ||
"@sentry/utils": "8.0.0-rc.2" | ||
"@sentry/types": "8.0.0-rc.3", | ||
"@sentry/utils": "8.0.0-rc.3" | ||
}, | ||
@@ -49,0 +49,0 @@ "madge": { |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.0.0-rc.2"; | ||
export declare const SDK_VERSION = "8.0.0-rc.3"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export declare const SDK_VERSION = "8.0.0-rc.2"; | ||
export declare const SDK_VERSION = "8.0.0-rc.3"; | ||
//# sourceMappingURL=version.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1780017
19463
+ Added@sentry/types@8.0.0-rc.3(transitive)
+ Added@sentry/utils@8.0.0-rc.3(transitive)
- Removed@sentry/types@8.0.0-rc.2(transitive)
- Removed@sentry/utils@8.0.0-rc.2(transitive)
Updated@sentry/types@8.0.0-rc.3
Updated@sentry/utils@8.0.0-rc.3