Skip to content

Commit e055f27

Browse files
authored
feat(tracing): Add custom finishReason for when interaction is interrupted by another (#7655)
1 parent dc0179c commit e055f27

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

packages/core/src/tracing/idletransaction.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,19 @@ export class IdleTransaction extends Transaction {
251251
}
252252
}
253253

254+
/**
255+
* Temporary method used to externally set the transaction's `finishReason`
256+
*
257+
* ** WARNING**
258+
* This is for the purpose of experimentation only and will be removed in the near future, do not use!
259+
*
260+
* @internal
261+
*
262+
*/
263+
public setFinishReason(reason: string): void {
264+
this._finishReason = reason;
265+
}
266+
254267
/**
255268
* Restarts idle timeout, if there is no running idle timeout it will start one.
256269
*/

packages/tracing-internal/src/browser/browsertracing.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ export class BrowserTracing implements Integration {
330330

331331
const op = 'ui.action.click';
332332
if (inflightInteractionTransaction) {
333+
inflightInteractionTransaction.setFinishReason('interactionInterrupted');
333334
inflightInteractionTransaction.finish();
334335
inflightInteractionTransaction = undefined;
335336
}

0 commit comments

Comments
 (0)