nuxt-community / sentry-module

Sentry module for Nuxt 2
https://sentry.nuxtjs.org
MIT License
501 stars 114 forks source link

Make transaction name configurable for performance monitoring. #613

Closed freezy closed 10 months ago

freezy commented 11 months ago

Is your feature request related to a problem? Please describe.

In Sentry's performance monitoring, I'd like to get the path instead of the route name in Sentry.

Describe the solution you'd like

Sentry.vueRouterInstrumentation actually supports this, by passing a configuration object with routeLabel to it.

Describe alternatives you've considered

I've tried using a script through clientConfig that is executed on runtime, but I can't figure out how to access the Vue integration through Context.$sentry so I could patch it.

Additional context

Maybe another vueRouterOptions parameter would do it? Would then be applied as second parameter in vueRouterInstrumentation() here.

freezy commented 11 months ago

There is also beforenavigate which is a configurable BrowserTracing option, but then, I'd need to pass a function from nuxt.config.ts, which isn't serializable?