From b8d1e9c7bfeb9f6833bd001d55bf9fdd661e0e5d Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Wed, 17 Jun 2020 16:04:23 -0400 Subject: [PATCH] fix(apm): Check if performance.mark() exists --- CHANGELOG.md | 1 + packages/apm/src/integrations/tracing.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb29698e4da4..b6e69e9580b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - [core] fix: Call `bindClient` when creating new `Hub` to make integrations work automatically (#2665) - [gatsby] feat: Add @sentry/gatsby package (#2652) - [core] ref: Rename `whitelistUrls/blacklistUrls` to `allowUrls/denyUrls` +- [apm] fix: Check if `performance.mark` exists before calling it (#2680) ## 5.17.0 diff --git a/packages/apm/src/integrations/tracing.ts b/packages/apm/src/integrations/tracing.ts index a6ce61fe4192..4eb8da1eb624 100644 --- a/packages/apm/src/integrations/tracing.ts +++ b/packages/apm/src/integrations/tracing.ts @@ -170,7 +170,9 @@ export class Tracing implements Integration { */ public constructor(_options?: Partial) { if (global.performance) { - global.performance.mark('sentry-tracing-init'); + if (global.performance.mark) { + global.performance.mark('sentry-tracing-init'); + } Tracing._trackLCP(); } const defaults = {