-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(tracing): Add custom finishReason for when interaction is interrupted by another #7655
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
Conversation
@@ -330,6 +330,7 @@ export class BrowserTracing implements Integration { | |||
|
|||
const op = 'ui.action.click'; | |||
if (inflightInteractionTransaction) { | |||
inflightInteractionTransaction._finishReason = 'interactionInterrupted'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this prob needs a ts-ignore.
Actually this also might break based on how we minify, so maybe we should just add a temporary setter for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the heads up, I'll add a custom setter instead 👍
@@ -339,6 +339,10 @@ export class IdleTransaction extends Transaction { | |||
this._beat(); | |||
}, this._heartbeatInterval); | |||
} | |||
|
|||
public setFinishReason(reason: string): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a docstring that says @internal
and then a big warning to say this will be changed/removed in future updates so don't use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, added!
size-limit report 📦
|
I want to track the frequency of this case, since we currently have no way of seeing it. When you click anywhere while another interaction transaction is still in progress, it gets finished. Therefore, we should add a new
finishReason
for this case.Reminder that
_finishReason
is for the purpose of experimentation only and I will remove it later, please excuse any sloppiness regarding making_finishReason
public and setting its value externally 😄