feat: merge tombstone and native sdk events #5037
Draft
+427
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📜 Description
This implements the second aspect of the tombstone integration: merging tombstone events with crash events coming from sentry-native. It does this in the following way:
OutboxSender, but instead letTombstoneIntegrationown the outbox folder before theOutboxSenderoperates on it (i.e., we rely on integration instantiation order and the fact that all async integration work is done on a single-threaded executor service).NativeEventCollectorimplements the duplication wrtOutboxSender, but specifically for handling envelopes that contain native crashesOutboxSenderlater, that change wouldn't be a considerable effort.sentry-native, so for now it's only exposed but not used.TombstonePolicysearches, matches, and merges eventsdebugMeta,exception, andthreadsThis is primarily an end-to-end implementation to discuss the trade-offs listed.
💡 Motivation and Context
This is the last essential step before releasing the tombstone integration to a wider audience. It maps directly to
Implement merge mechanism with the Native SDK envelope
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
OutboxSenderand surrounding infra more generically (we could introduce a callback for the core of theOutboxSenderdecision and set up integrations that use it accordingly)EventProcessorfor merge events?)