Skip to content

Commit

Permalink
fix(apm): Check if performance.mark() exists
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Jun 17, 2020
1 parent 236f8d7 commit f54cc07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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

## 5.17.0

Expand Down
4 changes: 3 additions & 1 deletion packages/apm/src/integrations/tracing.ts
Expand Up @@ -170,7 +170,9 @@ export class Tracing implements Integration {
*/
public constructor(_options?: Partial<TracingOptions>) {
if (global.performance) {
global.performance.mark('sentry-tracing-init');
if (global.performance.mark) {
global.performance.mark('sentry-tracing-init');
}
Tracing._trackLCP();
}
const defaults = {
Expand Down

0 comments on commit f54cc07

Please sign in to comment.