Skip to content

Commit 818a500

Browse files
committed
another fix
1 parent 1280d80 commit 818a500

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ember/addon/instance-initializers/sentry-performance.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,9 @@ function _instrumentInitialLoad(config: EmberSentryConfig): void {
366366
return;
367367
}
368368

369+
const origin = browserPerformanceTimeOrigin();
369370
// Split performance check in two so clearMarks still happens even if timeOrigin isn't available.
370-
if (!HAS_PERFORMANCE_TIMING || browserPerformanceTimeOrigin === undefined) {
371+
if (!HAS_PERFORMANCE_TIMING || origin === undefined) {
371372
return;
372373
}
373374
const measureName = '@sentry/ember:initial-load';
@@ -383,7 +384,7 @@ function _instrumentInitialLoad(config: EmberSentryConfig): void {
383384
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
384385
const measure = measures[0]!;
385386

386-
const startTime = (measure.startTime + browserPerformanceTimeOrigin) / 1000;
387+
const startTime = (measure.startTime + origin) / 1000;
387388
const endTime = startTime + measure.duration / 1000;
388389

389390
startInactiveSpan({

0 commit comments

Comments
 (0)