Skip to content

Transactions for ui.vue.update are sometimes created instead of spans #13546

Closed
@filips123

Description

@filips123

Is there an existing issue for this?

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:

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

No one assigned

    Labels

    Package: vueIssues related to the Sentry Vue SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions