Skip to content

Conversation

@supervacuus
Copy link
Collaborator

@supervacuus supervacuus commented Jan 19, 2026

📜 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:

  • No changes to the OutboxSender, but instead let TombstoneIntegration own the outbox folder before the OutboxSender operates 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).
  • NativeEventCollector implements the duplication wrt OutboxSender, but specifically for handling envelopes that contain native crashes
  • The upside is that we don't have to touch non-Android-specific code without making it more generic. If it turns out we want to extend OutboxSender later, that change wouldn't be a considerable effort.
  • Introduces a correlation id that allows us to map exactly between native SDK events and tombstones (vs correlating via timestamp). This requires changes to sentry-native, so for now it's only exposed but not used.
  • TombstonePolicy searches, matches, and merges events
  • merging is essentially: take the native SDK event and replace debugMeta, exception, and threads
  • Right now, these events will go through the same enrichment as the tombstones, which might or might not be the right choice

This 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?

  • only manually up to now
  • Once the direction is agreed on, will add unit+integration tests

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

  • decide on this approach or extending OutboxSender and surrounding infra more generically (we could introduce a callback for the core of the OutboxSender decision and set up integrations that use it accordingly)
  • decide merging strategy
  • decide on enrichment (maybe we should use a more default EventProcessor for merge events?)
  • Related to the above:
    • Should correlation only be attempted for the latest tombstone?
    • How should historical tombstones be matched? (Since we have all the actual data from the moment of the event in the native envelope, they will likely be more accurate for that moment in time vs backfilling, but we don't track the same amount of context information)
  • Add correlation id to the Native SDK

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Merge tombstone and native sdk events by supervacuus in #5037
  • Allow setting native SDK name in manifest by bitsandfoxes in #5027

Build / dependencies / internal 🔧

Deps

  • Bump JamesIves/github-pages-deploy-action from 4.7.6 to 4.8.0 by dependabot in #5015
  • Update Native SDK to v0.12.3 by github-actions in #5012
  • Bump github/codeql-action from 4.31.8 to 4.31.10 by dependabot in #5032

Other

  • (release) Switch from action-prepare-release to Craft by BYK in #5014

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6befa43

@supervacuus
Copy link
Collaborator Author

@markushi and @romtsn, can you have a first look so we can discuss trade-offs? Thx!

@github-actions
Copy link
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 320.09 ms 398.66 ms 78.57 ms
Size 1.58 MiB 2.20 MiB 637.07 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
b77456b 393.26 ms 441.10 ms 47.84 ms
d217708 409.83 ms 474.72 ms 64.89 ms
abf451a 332.82 ms 403.67 ms 70.85 ms
d15471f 286.65 ms 314.68 ms 28.03 ms
ee747ae 382.73 ms 435.41 ms 52.68 ms
fc5ccaf 279.11 ms 353.34 ms 74.23 ms
d5a29b6 298.62 ms 391.78 ms 93.16 ms
1edbdfa 364.77 ms 450.29 ms 85.52 ms
d15471f 294.13 ms 399.49 ms 105.36 ms
27d7cf8 306.76 ms 366.66 ms 59.90 ms

App size

Revision Plain With Sentry Diff
b77456b 1.58 MiB 2.12 MiB 548.11 KiB
d217708 1.58 MiB 2.10 MiB 532.97 KiB
abf451a 1.58 MiB 2.20 MiB 635.29 KiB
d15471f 1.58 MiB 2.13 MiB 559.54 KiB
ee747ae 1.58 MiB 2.10 MiB 530.95 KiB
fc5ccaf 1.58 MiB 2.13 MiB 557.54 KiB
d5a29b6 1.58 MiB 2.12 MiB 549.37 KiB
1edbdfa 1.58 MiB 2.20 MiB 635.34 KiB
d15471f 1.58 MiB 2.13 MiB 559.54 KiB
27d7cf8 1.58 MiB 2.12 MiB 549.42 KiB

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