Skip to content

Commit

Permalink
fix(apm): Check if performance.mark() exists (#2680)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad committed Jun 18, 2020
1 parent 32ff49a commit 7f74693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -11,7 +11,8 @@
- [gatsby] feat: Add @sentry/gatsby package (#2652)
- [core] ref: Rename `whitelistUrls/blacklistUrls` to `allowUrls/denyUrls`
- [react] ref: Refactor Profiler to account for update and render (#2677)
- [tracing] feat: Add ability to get span from activity using `getActivitySpan` (#2677)
- [apm] feat: Add ability to get span from activity using `getActivitySpan` (#2677)
- [apm] fix: Check if `performance.mark` exists before calling it (#2680)

## 5.17.0

Expand Down
4 changes: 3 additions & 1 deletion packages/apm/src/integrations/tracing.ts
Expand Up @@ -171,7 +171,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 7f74693

Please sign in to comment.