-
-
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
ref(v8): change integration.setupOnce signature #11238
Conversation
Make integration.setupOnce accept no arguments. This will allow us to easily remove addGlobalEventProcessor.
size-limit report 📦
|
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.
Nice!
Make `integration.setupOnce` accept no arguments. This will allow us to easily remove `addGlobalEventProcessor` which is deprecated API. This also means we can remove `IntegrationFnResult`, as the type signature of the functional and class based integrations are now the same. Next up - remove `addGlobalEventProcessor`!
Make `integration.setupOnce` accept no arguments. This will allow us to easily remove `addGlobalEventProcessor` which is deprecated API. This also means we can remove `IntegrationFnResult`, as the type signature of the functional and class based integrations are now the same. Next up - remove `addGlobalEventProcessor`!
Make `integration.setupOnce` accept no arguments. This will allow us to easily remove `addGlobalEventProcessor` which is deprecated API. This also means we can remove `IntegrationFnResult`, as the type signature of the functional and class based integrations are now the same. Next up - remove `addGlobalEventProcessor`!
This caused a regression (PostHog/posthog-js#1205) is there a migration guide? |
Instead of passing these in, you should just use the global methods const integration = {
setupOnce(addGlobalEventProcessor, getCurrentHub) {
// do something...
}
} Do this: const integration = {
setupOnce() {
Sentry.addEventProcessor(...);
// use respective replacement of hub
}
} We do not have good docs on this yet, we'll update them accordingly! In most places, you should not use const integration = {
processEvent(event, hint) {
// use this directly if you just want to process events
return event;
},
setup(client) {
// use this for things you want to run once on setup of your app/client
}
} |
Thanks! I was able to get it working here. It's a 3rd party library so they'll need to update it. |
For reference, and people stumbling over this later, here the PR to update the docs for the integration interface: getsentry/sentry-docs#10150 |
Make
integration.setupOnce
accept no arguments. This will allow us to easily removeaddGlobalEventProcessor
which is deprecated API.This also means we can remove
IntegrationFnResult
, as the type signature of the functional and class based integrations are now the same.Next up - remove
addGlobalEventProcessor
!