Skip to content

Commit

Permalink
ref: Remove performance clear entry calls (#2490)
Browse files Browse the repository at this point in the history
* ref: Use `onresourcetimingbufferfull`

* ref: Increase buffer *2

* chore: Changelog

* fix: Remove callback
  • Loading branch information
HazAT committed Mar 12, 2020
1 parent 5f1179d commit b6dd2c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

- [apm] ref: Remove performance clear entry calls (#2490)

## 5.14.0

- [apm] feat: Add a simple heartbeat check, if activities don't change in 3 beats, finish the transaction (#2478)
Expand Down
8 changes: 0 additions & 8 deletions packages/apm/src/integrations/tracing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,14 +603,6 @@ export class Tracing implements Integration {
addSpan(evaluation);
}

// The Performance object has a limited buffer size, often 150 entries. At some point the buffer may overflow, in
// which case we would not be able to use it to create/update spans. Therefore, after we have processed entries to
// report to Sentry, we clear the buffer in an attempt to allow for more entries to be added in the future.
// https://developer.mozilla.org/en-US/docs/Web/API/Performance
logger.log('[Tracing] Clearing most performance marks');
performance.clearMarks();
performance.clearMeasures();
performance.clearResourceTimings();
Tracing._performanceCursor = Math.max(performance.getEntries().length - 1, 0);

// tslint:enable: no-unsafe-any
Expand Down

0 comments on commit b6dd2c7

Please sign in to comment.