Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(apm): Check if performance.mark() exists #2680

Merged
merged 2 commits into from Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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