feat: Add before_send_transaction#1236
Conversation
|
Because this function is used for regular event capture, and during the capture of crashes from the handler. We want to invoke the
As late as possible: after applying the scope. What would your argument be against that?
The
I think so, but similar to the concrete place of calling the callback I would compare with other SDKs. |
supervacuus
left a comment
There was a problem hiding this comment.
Looks great. Just wonder about the parameter naming and whether we should use the PR to make its use consistent.
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Part of getsentry/sentry-native#1236 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Part of getsentry/sentry-native#1236 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+
Fixes #1214 (and related to #864 (comment))
ToDo
questions (resolved)
Why do we have invoke_before_send passed into prepare_event (see code), and why is it true for sentry_core occurrences (1, 2), but passed as !options->on_crash_func for breakpad?
Where do we callback? Before or after applying scope?
(void* hint) parameter (which is unused for the other callbacks, but exists afaict), see here
Do we want to add
before_transaction_datato modify transactions before sending? see here