Skip to content

Commit

Permalink
fix long-task tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinL10 committed Aug 7, 2024
1 parent 47842da commit 7a42707
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Sentry.init({
integrations: [
Sentry.browserTracingIntegration({
idleTimeout: 9000,
enableLongAnimationFrame: false,
}),
],
tracesSampleRate: 1,
Expand Down
8 changes: 6 additions & 2 deletions packages/ember/tests/helpers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,15 @@ export function assertSentryTransactions(

// instead of checking the specific order of runloop spans (which is brittle),
// we check (below) that _any_ runloop spans are added
// Also we ignore ui.long-task spans, as they are brittle and may or may not appear
// Also we ignore ui.long-task spans and ui.long-animation-frame, as they are brittle and may or may not appear
const filteredSpans = spans
.filter(span => {
const op = span.op;
return !op?.startsWith('ui.ember.runloop.') && !op?.startsWith('ui.long-task');
return (
!op?.startsWith('ui.ember.runloop.') &&
!op?.startsWith('ui.long-task') &&
!op?.startsWith('ui.long-animation-frame')
);
})
.map(spanJson => {
return `${spanJson.op} | ${spanJson.description}`;
Expand Down

0 comments on commit 7a42707

Please sign in to comment.