Skip to content

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

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

0Calories
Copy link
Contributor

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 😄

@0Calories 0Calories requested review from k-fish, AbhiPrasad and a team March 29, 2023 16:22
@0Calories 0Calories self-assigned this Mar 29, 2023
@0Calories 0Calories requested review from mydea and removed request for a team March 29, 2023 16:22
@AbhiPrasad AbhiPrasad changed the title feat(interactions): Add custom finishReason for when interaction is interrupted by another feat(tracing): Add custom finishReason for when interaction is interrupted by another Mar 29, 2023
@@ -330,6 +330,7 @@ export class BrowserTracing implements Integration {

const op = 'ui.action.click';
if (inflightInteractionTransaction) {
inflightInteractionTransaction._finishReason = 'interactionInterrupted';
Copy link
Member

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.

Copy link
Contributor Author

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 {
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, added!

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.62 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 64.4 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 19.15 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 56.78 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 21.53 KB (0%)
@sentry/browser - Webpack (minified) 72 KB (0%)
@sentry/react - Webpack (gzipped + minified) 21.55 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 52 KB (+0.05% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 28.19 KB (+0.11% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 26.39 KB (+0.09% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 44.74 KB (-0.01% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.86 KB (0%)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 63.43 KB (+0.04% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 56.49 KB (-0.01% 🔽)

@AbhiPrasad AbhiPrasad merged commit e055f27 into develop Mar 30, 2023
@AbhiPrasad AbhiPrasad deleted the feat/interaction-interrupt-finish-reason branch March 30, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants