@sentry-internal/browser-utils
Advanced tools
Comparing version 8.22.0 to 8.23.0
@@ -56,6 +56,6 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
instrument.addPerformanceInstrumentationHandler('longtask', ({ entries }) => { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of entries) { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
const startTime = utils.msToSec((utils$1.browserPerformanceTimeOrigin ) + entry.startTime); | ||
@@ -87,8 +87,8 @@ const duration = utils.msToSec(entry.duration); | ||
const observer = new PerformanceObserver(list => { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of list.getEntries() ) { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
if (!entry.scripts[0]) { | ||
return; | ||
continue; | ||
} | ||
@@ -102,17 +102,16 @@ | ||
}; | ||
const initialScript = entry.scripts[0]; | ||
if (initialScript) { | ||
const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript; | ||
attributes['browser.script.invoker'] = invoker; | ||
attributes['browser.script.invoker_type'] = invokerType; | ||
if (sourceURL) { | ||
attributes['code.filepath'] = sourceURL; | ||
} | ||
if (sourceFunctionName) { | ||
attributes['code.function'] = sourceFunctionName; | ||
} | ||
if (sourceCharPosition !== -1) { | ||
attributes['browser.script.source_char_position'] = sourceCharPosition; | ||
} | ||
const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript; | ||
attributes['browser.script.invoker'] = invoker; | ||
attributes['browser.script.invoker_type'] = invokerType; | ||
if (sourceURL) { | ||
attributes['code.filepath'] = sourceURL; | ||
} | ||
if (sourceFunctionName) { | ||
attributes['code.function'] = sourceFunctionName; | ||
} | ||
if (sourceCharPosition !== -1) { | ||
attributes['browser.script.source_char_position'] = sourceCharPosition; | ||
} | ||
@@ -139,7 +138,6 @@ const span = core.startInactiveSpan({ | ||
instrument.addPerformanceInstrumentationHandler('event', ({ entries }) => { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of entries) { | ||
if (!core.getActiveSpan()) { | ||
return; | ||
} | ||
if (entry.name === 'click') { | ||
@@ -146,0 +144,0 @@ const startTime = utils.msToSec((utils$1.browserPerformanceTimeOrigin ) + entry.startTime); |
@@ -54,6 +54,6 @@ import { getActiveSpan, startInactiveSpan, spanToJSON, setMeasurement, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
addPerformanceInstrumentationHandler('longtask', ({ entries }) => { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of entries) { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime); | ||
@@ -85,8 +85,8 @@ const duration = msToSec(entry.duration); | ||
const observer = new PerformanceObserver(list => { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of list.getEntries() ) { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
if (!entry.scripts[0]) { | ||
return; | ||
continue; | ||
} | ||
@@ -100,17 +100,16 @@ | ||
}; | ||
const initialScript = entry.scripts[0]; | ||
if (initialScript) { | ||
const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript; | ||
attributes['browser.script.invoker'] = invoker; | ||
attributes['browser.script.invoker_type'] = invokerType; | ||
if (sourceURL) { | ||
attributes['code.filepath'] = sourceURL; | ||
} | ||
if (sourceFunctionName) { | ||
attributes['code.function'] = sourceFunctionName; | ||
} | ||
if (sourceCharPosition !== -1) { | ||
attributes['browser.script.source_char_position'] = sourceCharPosition; | ||
} | ||
const { invoker, invokerType, sourceURL, sourceFunctionName, sourceCharPosition } = initialScript; | ||
attributes['browser.script.invoker'] = invoker; | ||
attributes['browser.script.invoker_type'] = invokerType; | ||
if (sourceURL) { | ||
attributes['code.filepath'] = sourceURL; | ||
} | ||
if (sourceFunctionName) { | ||
attributes['code.function'] = sourceFunctionName; | ||
} | ||
if (sourceCharPosition !== -1) { | ||
attributes['browser.script.source_char_position'] = sourceCharPosition; | ||
} | ||
@@ -137,7 +136,6 @@ const span = startInactiveSpan({ | ||
addPerformanceInstrumentationHandler('event', ({ entries }) => { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
for (const entry of entries) { | ||
if (!getActiveSpan()) { | ||
return; | ||
} | ||
if (entry.name === 'click') { | ||
@@ -144,0 +142,0 @@ const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime); |
{ | ||
"name": "@sentry-internal/browser-utils", | ||
"version": "8.22.0", | ||
"version": "8.23.0", | ||
"description": "Browser Utilities for all Sentry JavaScript SDKs", | ||
@@ -42,5 +42,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/core": "8.22.0", | ||
"@sentry/types": "8.22.0", | ||
"@sentry/utils": "8.22.0" | ||
"@sentry/core": "8.23.0", | ||
"@sentry/types": "8.23.0", | ||
"@sentry/utils": "8.23.0" | ||
}, | ||
@@ -47,0 +47,0 @@ "scripts": { |
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
662445
7077
+ Added@sentry/core@8.23.0(transitive)
+ Added@sentry/types@8.23.0(transitive)
+ Added@sentry/utils@8.23.0(transitive)
- Removed@sentry/core@8.22.0(transitive)
- Removed@sentry/types@8.22.0(transitive)
- Removed@sentry/utils@8.22.0(transitive)
Updated@sentry/core@8.23.0
Updated@sentry/types@8.23.0
Updated@sentry/utils@8.23.0