Skip to content

feat(integrations): Introduce processEvent hook on Integration#9015

Closed
mydea wants to merge 1 commit intodevelopfrom
fn/integration-prepareEvent
Closed

feat(integrations): Introduce processEvent hook on Integration#9015
mydea wants to merge 1 commit intodevelopfrom
fn/integration-prepareEvent

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented Sep 13, 2023

This adds a new (optional) processEvent hook on the Integration interface, which allows to register an event processor for the current client only.

This has actually correct semantics in that the processor will only be registered for the client that the integration is added for. This is done by adding a new addEventProcessor method on the baseclient, which for now are called after all global & scope event processors.

Previously, all integrations always registered a global event processor, which is not really necessary. With this, we can be much more focused & also skip checking for existence of the integration on the client etc.

This adds a new (optional) `processEvent` hook on the `Integration` interface, which allows to register an event processor **for the current client only**.

This has actually correct semantics in that the processor will only be registered for the client that the integration is added for. This is done by adding a new `addEventProcessor` method on the baseclient, which for now are called after all global & scope event processors.
@mydea mydea self-assigned this Sep 13, 2023
@AbhiPrasad
Copy link
Copy Markdown
Contributor

Can we add the types first, and then do the integrations one package at a time? Makes it easier to review.

@mydea
Copy link
Copy Markdown
Member Author

mydea commented Sep 13, 2023

Can we add the types first, and then do the integrations one package at a time? Makes it easier to review.

Sure thing, makes sense 👍

@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 75.41 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 31.29 KB (-0.11% 🔽)
@sentry/browser - Webpack (gzipped) 21.89 KB (-0.12% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 70.17 KB (0%)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 28.49 KB (-0.05% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped) 20.57 KB (-0.12% 🔽)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 221.84 KB (+0.03% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 86.38 KB (+0.06% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 61.22 KB (+0.08% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.38 KB (-0.04% 🔽)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 75.43 KB (+0.02% 🔺)
@sentry/react - Webpack (gzipped) 21.92 KB (-0.11% 🔽)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 93.32 KB (+0.05% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 50.91 KB (+0.04% 🔺)

@mydea mydea closed this Sep 13, 2023
@mydea mydea deleted the fn/integration-prepareEvent branch November 17, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants