Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/browser/src/profiling/cache.ts

This file was deleted.

7 changes: 7 additions & 0 deletions packages/browser/src/profiling/hubextensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,15 @@ export function wrapTransactionWithProfiling(transaction: Transaction): Transact
return null;
}

// This is temporary - we will use the collected span data to evaluate
// if deferring txn.finish until profiler resolves is a viable approach.
const stopProfilerSpan = transaction.startChild({ description: 'profiler.stop', op: 'profiler' });

return profiler
.stop()
.then((p: JSSelfProfile): null => {
stopProfilerSpan.finish();

if (maxDurationTimeoutID) {
WINDOW.clearTimeout(maxDurationTimeoutID);
maxDurationTimeoutID = undefined;
Expand All @@ -199,6 +205,7 @@ export function wrapTransactionWithProfiling(transaction: Transaction): Transact
return null;
})
.catch(error => {
stopProfilerSpan.finish();
if (__DEBUG_BUILD__) {
logger.log('[Profiling] error while stopping profiler:', error);
}
Expand Down