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
fix(vue): Don't overwrite custom transaction names of pageload transactions #6060
Conversation
if (pageloadTransaction.metadata.source !== 'custom') { | ||
pageloadTransaction.setName(transactionName, transactionSource); | ||
} | ||
pageloadTransaction.setData('params', data.params); | ||
pageloadTransaction.setData('query', data.query); |
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.
I guess there's an argument to be made that if we have a custom source here, we don't need to set the params
and query
data. Happy to change this if reviewers prefer that.
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.
I'm generally of the school of thought that (within reason) more data is better. We've been sending it before now, so I vote that we keep doing so.
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 point. Then I'll keep it as is
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.
LGTM!
size-limit report 📦
|
As brought to our attention in #6048, our pageload transaction start change (which makes the transaction start earlier) introduced in #5983 caused custom transaction names to be overwritten when
beforeNavigate
is used to update the transaction name.This patch fixes this problem by checking for the transaction source before (not) updating the current transaction name with the resolved route name once the router's
beforeEach
hook was called. Furthermore, it adds a test to cover this case.See #6048 (comment) for the motivation for creating this PR.
fixes #6047