-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat: Vue performance monitoring #2571
Conversation
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.
First pass 👀
* https://github.com/vuejs/vue/blob/c2b1cfe9ccd08835f2d99f6ce60f67b4de55187f/src/core/util/error.js#L38-L48 | ||
*/ | ||
logErrors: boolean; | ||
tracing: boolean; |
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.
Can we reasonably detect that tracing is enabled without this?
We've talked about enabling tracing whenever the Tracing integration was on. That would make for one less boilerplate line in Sentry.init
.
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.
Sure, I'm already doing that. But what if someone wants to have error handling, xhr tracing, but skip Vue tracing?
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.
We also cannot tell if Tracing
integration is in place during setup (subject to change in v6)
|
packages/integrations/package.json
Outdated
@@ -16,6 +16,7 @@ | |||
"module": "esm/index.js", | |||
"types": "dist/index.d.ts", | |||
"dependencies": { | |||
"@sentry/apm": "5.15.5", |
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.
Hmm this is interesting. How does it affect bundle size?
How does it impact users of the integrations that don't use @sentry/apm
?
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.
It doesn't if you are not using Vue. It'll be fetched though.
I was thinking about passing apm's Tracing integration as a parameter, buuut not sure if it's worth it just yet.
interface TracingOptions { | ||
/** | ||
* Decides whether to track components by hooking into its lifecycle methods. | ||
* Can be either set to `boolean` to enable/disable tracking for all of them. |
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.
Can we defer the option to "track all"? It seems like a sharp edge for me.
Plus, TracingOptions.trackComponents: false
somehow conflicts with IntegrationOptions.tracing
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.
trackComponents
will be effectively ignored if you don't set tracing: true
.
Regarding tracking everything, I'm not sure why we'd want to postpone it tbh cc @HazAT
Is documentation for this released already? Can't see this mentioned on https://docs.sentry.io/performance/distributed-tracing/ so I guess not? Also, will this be usable when doing server-side rendering of Vue (for example in Nuxt)? |
We are currently working on the docs update for this. |
BTW. I think it's wrong that
So that's effectively a breaking change (even though it might not be breaking anything apart from introducing an error message). What's your opinion on that? Should it change? |
Good catch, yeah we should remove the error message in case tracing is not enabled. |
Clarification, sorry. This is only logged with |
Docs Draft: https://gist.github.com/kamilogorek/1279bd2d39ba07f2ddd69cc684449949
Example usage (minimal):
Example usage (w. components tracking):
https://github.com/getsentry/sentry-vue-perf can be used to verify the implementation locally (just swap the implementation in there, for the one showcased above).