Skip to content

feat(core): Pass event as third argument to recordDroppedEvent #6289

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

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 24, 2022

For replay, we want to provide an easy (internal) way to strip out dropped events.
Our idea is to monkey patch recordDroppedEvent in replay, and use it to get notified of which events have been dropped, and handle that internally. This requires the recordDroppedEvent callback to actually receive the event as argument.

This PR changes the signature so that it receives an error/transaction event as optional third argument. For other types of dropped events (e.g. attachments), undefined is passed.

ref #6285

This is optional. We need this for replay.
@mydea mydea added Package: core Issues related to the Sentry Core SDK Package: replay Issues related to the Sentry Replay SDK labels Nov 24, 2022
@mydea mydea self-assigned this Nov 24, 2022
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.54 KB (+0.2% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 60.42 KB (+0.23% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.21 KB (+0.25% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 53.77 KB (+0.26% 🔺)
@sentry/browser - Webpack (gzipped + minified) 19.94 KB (+0.2% 🔺)
@sentry/browser - Webpack (minified) 65.25 KB (+0.21% 🔺)
@sentry/react - Webpack (gzipped + minified) 19.96 KB (+0.19% 🔺)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.96 KB (+0.08% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.41 KB (+0.19% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.83 KB (+0.21% 🔺)

@mydea mydea merged commit 7821ba7 into master Nov 25, 2022
@mydea mydea deleted the fn/extend-dropped-events branch November 25, 2022 08:32
@Lms24 Lms24 mentioned this pull request Dec 1, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: core Issues related to the Sentry Core SDK Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants