-
-
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): Deprecate configuring Vue tracing options anywhere else other than through the vueIntegration
's tracingOptions
option
#14385
Conversation
…her than through the `vueIntegration`'s `tracingOptions` option
size-limit report 📦
|
integrations: [ | ||
Sentry.vueIntegration({ | ||
tracingOptions: { | ||
trackComponents: true, |
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.
the only thing we could think about elevating to root-level config IMHO is trackComponents
, this seems somewhat important enough to possibly warrant this (and also should not be too confusing). So IMHO we could still allow this specifically to also be passed directly to init()
, in addition to allowing to pass it to the integration, but no strong feelings.
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 also admittedly don't have hard feelings towards this. I would err towards not allowing it top-level because it opens the door for things tree-shaking in the future, and less ambiguous docs.
@Lms24 @s1gr1d do you have opinions on whether or not we should still allow trackComponents
as a top-level Sentry.init()
option?
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'd prefer keeping it integration only because if Sentry.vueIntegration
is filtered out, then trackComponents
doesn't do anything.
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 am with Abhi on that, but in Nuxt the vueIntegration
is added by the SDK not the user, so I would have to introduce an option in the Nuxt SDK init()
which still allows overriding the vueIntegration
options.
Something like vueOptions
?
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 opened a PR to update the docs. That will maybe highlight a bit better what the config will look like: getsentry/sentry-docs#11917
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.
Component tracking options are mostly defined outside the Sentry.init options across our SDKs. I think it's fine to only have them at integration level in Vue. For Nuxt, we probably want to figure out a way of still letting users change things but I'd argue this is a long-term goal. AFAIK, we don't have docs on component tracking in meta framework SDKs at all at the moment.
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.
Ah I see how you envisioned it for Nuxt - users add the vueIntegration
themselves. However, I think that would not work here, as the Nuxt SDK already adds the vueIntegration
internally to setup the Vue router. This happens here:
sentryClient.addIntegration(vueIntegration({ app: vueApp, attachErrorHandler: false })); |
It happens at this place in the Nuxt SDK as we need to pass the vueApp
and this is the earliest place to do so (the user cannot pass it).
So we would still have to add something like a vueOptions
key for the Nuxt SDK init
as we cannot call the integration twice.
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.
So we would still have to add something like a vueOptions key for the Nuxt SDK init as we cannot call the integration twice.
i think that's fine
Ref: #14265
Currently there are 4 ways of configuring the
tracingOptions
:tracingOptions
in Sentry.init()vueIntegration()
optionstracingOptions
in thevueIntegration()
optionsBecause that is may to many ways of configuration, we decided that the only way should be inside
tracingOptions
in thevueIntegration()
options.