@sentry/browser
Advanced tools
Comparing version 9.0.0-alpha.0 to 9.0.0-alpha.1
@@ -42,5 +42,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
? __SENTRY_RELEASE__ | ||
: helpers.WINDOW.SENTRY_RELEASE?.id // This supports the variable that sentry-webpack-plugin injects | ||
? helpers.WINDOW.SENTRY_RELEASE.id | ||
: undefined, | ||
: helpers.WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects | ||
sendClientReports: true, | ||
@@ -47,0 +45,0 @@ }; |
@@ -141,33 +141,2 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
/** | ||
* Converts ALPN protocol ids to name and version. | ||
* | ||
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) | ||
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol | ||
*/ | ||
function extractNetworkProtocol(nextHopProtocol) { | ||
let name = 'unknown'; | ||
let version = 'unknown'; | ||
let _name = ''; | ||
for (const char of nextHopProtocol) { | ||
// http/1.1 etc. | ||
if (char === '/') { | ||
[name, version] = nextHopProtocol.split('/') ; | ||
break; | ||
} | ||
// h2, h3 etc. | ||
if (!isNaN(Number(char))) { | ||
name = _name === 'h' ? 'http' : _name; | ||
version = nextHopProtocol.split(_name)[1] ; | ||
break; | ||
} | ||
_name += char; | ||
} | ||
if (_name === nextHopProtocol) { | ||
// webrtc, ftp, etc. | ||
name = _name; | ||
} | ||
return { name, version }; | ||
} | ||
function getAbsoluteTime(time = 0) { | ||
@@ -178,3 +147,3 @@ return ((core.browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000; | ||
function resourceTimingEntryToSpanData(resourceTiming) { | ||
const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol); | ||
const { name, version } = browserUtils.extractNetworkProtocol(resourceTiming.nextHopProtocol); | ||
@@ -362,3 +331,2 @@ const timingSpanData = []; | ||
exports.defaultRequestInstrumentationOptions = defaultRequestInstrumentationOptions; | ||
exports.extractNetworkProtocol = extractNetworkProtocol; | ||
exports.instrumentOutgoingRequests = instrumentOutgoingRequests; | ||
@@ -365,0 +333,0 @@ exports.shouldAttachHeaders = shouldAttachHeaders; |
@@ -24,3 +24,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
method: 'POST', | ||
referrerPolicy: 'origin', | ||
referrerPolicy: 'strict-origin', | ||
headers: options.headers, | ||
@@ -27,0 +27,0 @@ // Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to |
@@ -59,3 +59,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | ||
script.crossOrigin = 'anonymous'; | ||
script.referrerPolicy = 'origin'; | ||
script.referrerPolicy = 'strict-origin'; | ||
@@ -62,0 +62,0 @@ if (scriptNonce) { |
@@ -1,1 +0,1 @@ | ||
{"type":"module","version":"9.0.0-alpha.0","sideEffects":false} | ||
{"type":"module","version":"9.0.0-alpha.1","sideEffects":false} |
@@ -40,5 +40,3 @@ import { inboundFiltersIntegration, functionToStringIntegration, dedupeIntegration, consoleSandbox, supportsFetch, logger, stackParserFromStackParserOptions, getIntegrationsToSetup, initAndBind, getCurrentScope, lastEventId, getReportDialogEndpoint, getLocationHref } from '@sentry/core'; | ||
? __SENTRY_RELEASE__ | ||
: WINDOW.SENTRY_RELEASE?.id // This supports the variable that sentry-webpack-plugin injects | ||
? WINDOW.SENTRY_RELEASE.id | ||
: undefined, | ||
: WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects | ||
sendClientReports: true, | ||
@@ -45,0 +43,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils'; | ||
import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, extractNetworkProtocol, SENTRY_XHR_DATA_KEY } from '@sentry-internal/browser-utils'; | ||
import { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, spanToJSON, browserPerformanceTimeOrigin, hasTracingEnabled, setHttpStatus, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, SentryNonRecordingSpan, getTraceData, getLocationHref, stringMatchesSomePattern } from '@sentry/core'; | ||
@@ -139,33 +139,2 @@ import { WINDOW } from '../helpers.js'; | ||
/** | ||
* Converts ALPN protocol ids to name and version. | ||
* | ||
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) | ||
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol | ||
*/ | ||
function extractNetworkProtocol(nextHopProtocol) { | ||
let name = 'unknown'; | ||
let version = 'unknown'; | ||
let _name = ''; | ||
for (const char of nextHopProtocol) { | ||
// http/1.1 etc. | ||
if (char === '/') { | ||
[name, version] = nextHopProtocol.split('/') ; | ||
break; | ||
} | ||
// h2, h3 etc. | ||
if (!isNaN(Number(char))) { | ||
name = _name === 'h' ? 'http' : _name; | ||
version = nextHopProtocol.split(_name)[1] ; | ||
break; | ||
} | ||
_name += char; | ||
} | ||
if (_name === nextHopProtocol) { | ||
// webrtc, ftp, etc. | ||
name = _name; | ||
} | ||
return { name, version }; | ||
} | ||
function getAbsoluteTime(time = 0) { | ||
@@ -358,3 +327,3 @@ return ((browserPerformanceTimeOrigin() || performance.timeOrigin) + time) / 1000; | ||
export { defaultRequestInstrumentationOptions, extractNetworkProtocol, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback }; | ||
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback }; | ||
//# sourceMappingURL=request.js.map |
@@ -22,3 +22,3 @@ import { getNativeImplementation, clearCachedImplementation } from '@sentry-internal/browser-utils'; | ||
method: 'POST', | ||
referrerPolicy: 'origin', | ||
referrerPolicy: 'strict-origin', | ||
headers: options.headers, | ||
@@ -25,0 +25,0 @@ // Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to |
@@ -57,3 +57,3 @@ import { getClient, SDK_VERSION } from '@sentry/core'; | ||
script.crossOrigin = 'anonymous'; | ||
script.referrerPolicy = 'origin'; | ||
script.referrerPolicy = 'strict-origin'; | ||
@@ -60,0 +60,0 @@ if (scriptNonce) { |
@@ -72,12 +72,2 @@ import { Client, HandlerDataXhr, Span } from '@sentry/core'; | ||
/** | ||
* Converts ALPN protocol ids to name and version. | ||
* | ||
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) | ||
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol | ||
*/ | ||
export declare function extractNetworkProtocol(nextHopProtocol: string): { | ||
name: string; | ||
version: string; | ||
}; | ||
/** | ||
* A function that determines whether to attach tracing headers to a request. | ||
@@ -84,0 +74,0 @@ * We only export this function for testing purposes. |
@@ -72,12 +72,2 @@ import type { Client, HandlerDataXhr, Span } from '@sentry/core'; | ||
/** | ||
* Converts ALPN protocol ids to name and version. | ||
* | ||
* (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids) | ||
* @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol | ||
*/ | ||
export declare function extractNetworkProtocol(nextHopProtocol: string): { | ||
name: string; | ||
version: string; | ||
}; | ||
/** | ||
* A function that determines whether to attach tracing headers to a request. | ||
@@ -84,0 +74,0 @@ * We only export this function for testing purposes. |
{ | ||
"name": "@sentry/browser", | ||
"version": "9.0.0-alpha.0", | ||
"version": "9.0.0-alpha.1", | ||
"description": "Official Sentry SDK for browsers", | ||
@@ -42,10 +42,10 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry-internal/browser-utils": "9.0.0-alpha.0", | ||
"@sentry-internal/feedback": "9.0.0-alpha.0", | ||
"@sentry-internal/replay": "9.0.0-alpha.0", | ||
"@sentry-internal/replay-canvas": "9.0.0-alpha.0", | ||
"@sentry/core": "9.0.0-alpha.0" | ||
"@sentry-internal/browser-utils": "9.0.0-alpha.1", | ||
"@sentry-internal/feedback": "9.0.0-alpha.1", | ||
"@sentry-internal/replay": "9.0.0-alpha.1", | ||
"@sentry-internal/replay-canvas": "9.0.0-alpha.1", | ||
"@sentry/core": "9.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"@sentry-internal/integration-shims": "9.0.0-alpha.0", | ||
"@sentry-internal/integration-shims": "9.0.0-alpha.1", | ||
"fake-indexeddb": "^4.0.1" | ||
@@ -52,0 +52,0 @@ }, |
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
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
Sorry, the diff of this file is not supported yet
1038316
10990
+ Added@sentry-internal/browser-utils@9.0.0-alpha.1(transitive)
+ Added@sentry-internal/feedback@9.0.0-alpha.1(transitive)
+ Added@sentry-internal/replay@9.0.0-alpha.1(transitive)
+ Added@sentry-internal/replay-canvas@9.0.0-alpha.1(transitive)
+ Added@sentry/core@9.0.0-alpha.1(transitive)
- Removed@sentry-internal/browser-utils@9.0.0-alpha.0(transitive)
- Removed@sentry-internal/feedback@9.0.0-alpha.0(transitive)
- Removed@sentry-internal/replay@9.0.0-alpha.0(transitive)
- Removed@sentry-internal/replay-canvas@9.0.0-alpha.0(transitive)
- Removed@sentry/core@9.0.0-alpha.0(transitive)
Updated@sentry/core@9.0.0-alpha.1