Skip to content

Commit 7f74693

Browse files
authored
fix(apm): Check if performance.mark() exists (#2680)
1 parent 32ff49a commit 7f74693

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
- [gatsby] feat: Add @sentry/gatsby package (#2652)
1212
- [core] ref: Rename `whitelistUrls/blacklistUrls` to `allowUrls/denyUrls`
1313
- [react] ref: Refactor Profiler to account for update and render (#2677)
14-
- [tracing] feat: Add ability to get span from activity using `getActivitySpan` (#2677)
14+
- [apm] feat: Add ability to get span from activity using `getActivitySpan` (#2677)
15+
- [apm] fix: Check if `performance.mark` exists before calling it (#2680)
1516

1617
## 5.17.0
1718

packages/apm/src/integrations/tracing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ export class Tracing implements Integration {
171171
*/
172172
public constructor(_options?: Partial<TracingOptions>) {
173173
if (global.performance) {
174-
global.performance.mark('sentry-tracing-init');
174+
if (global.performance.mark) {
175+
global.performance.mark('sentry-tracing-init');
176+
}
175177
Tracing._trackLCP();
176178
}
177179
const defaults = {

0 commit comments

Comments
 (0)