Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/vue
SDK Version
8.27.0
Framework Version
Vue 3.4.38
Link to Sentry event
No response
Reproduction Example/SDK Setup
I'm using a custom browserTracingIntegration
function that names transactions in a specific way, but it's based on the normal Vue router instrumentation. So, it's possible that this issue is caused by the error in my code. In this case, I would like to know how to fix it.
Steps to Reproduce
Because I'm using custom integration, it's hard to fully reproduce this. I also wasn't able to reproduce it myself, I've only seen on Sentry that it happened to a few users.
Expected Result
All transactions should be named according to the rules in my custom integration, and ui.vue.update
and other events should be created as spans on the pageload
or navigation
transaction.
Actual Result
There seem to be two (slightly related) issues:
Sometimes, transaction names are not parametrized according to the route params, but instead use raw URLs:
This appears to happen because the user hides the page while the document is loading, so the transaction is cancelled with sentry.cancellation_reason document.hidden
and sent to Sentry before the Sentry code in the Vue router guard could rename it. This also happens with the default Sentry Vue integration. It's quite easy to reproduce this by adding some delay in another navigation guard and hiding the page before the Sentry integration code runs.
In this case, I would expect that once the Sentry guard executed, it renamed the (already cancelled) transaction to the correct name.
Another issue is that events for component tracing like ui.vue.update - Vue <<VAppBar>>
are sometimes created as new transactions instead of spans in the original pageload
/navigation transaction
:
- https://gimvicurnik.sentry.io/performance/trace/b52ea50088954306b1c08492756dd671/?node=txn-2fd95f47309246a5838ee7345e432b2c
- https://gimvicurnik.sentry.io/performance/trace/1ab7fa4579704b48bcfb32a334fc3847/?node=txn-2b4aa84444af4a9dbd981aab4ee57377
- https://gimvicurnik.sentry.io/performance/trace/db333ba1e1f94e5ca530fd07fc010060/?node=txn-4215a64f27d74dc4a73c328c610913b1
- https://gimvicurnik.sentry.io/discover/results/?query=Vue
This issue seems to have a similar reason as above, as the pageload
transaction has been cancelled with sentry.cancellation_reason document.hidden
. However, I could not reproduce it myself, so I don't know if it also happens with the default integration.
I would expect that these events were added to the original transaction as spans, even though it has been cancelled, or at least discarded, instead of creating incorrect transactions.
Metadata
Metadata
Assignees
Type
Projects
Status