Conversation
Contributor
|
📲 Install BuildsAndroid
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Makes the time window used to merge a tombstone with a native crash event configurable.
NativeEventCollectorhad a hardcodedTIMESTAMP_TOLERANCE_MS = 5000; it now readsSentryAndroidOptions.getTombstoneMergeTimeThresholdMillis(), which keeps5000ms as its default, so behavior does not change unless the option is set.The matching code also logs the threshold together with the measured gap, and logs when no native event was inside the window, so a failed merge can be diagnosed from a debug log.
💡 Motivation and Context
A user reported that native crashes still arrive as
signalhandlerevents with a thin native stack instead ofTombstoneMerged. The gap between the tombstone timestamp and the native crash envelope was 5.786 s, just above the fixed 5 s window, so the two were never paired. There was no way to raise the window.💚 How did you test it?
Unit tests in
sentry-android-core:NativeEventCollectorTest: a 5.8 s gap (the gap from the report) does not match with the default threshold, matches with the threshold raised to 10000 ms, and a 2 s gap does not match with the threshold lowered to 1000 ms.ManifestMetadataReaderTest: the manifest value is applied, and the default is kept when the tag is absent.SentryAndroidOptionsTest: default of 5000 ms and the setter.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The option is Android only, like the other tombstone options, so it is not wired into
ExternalOptions(sentry.properties) or Spring Boot properties. Documentation for the new option can follow if the team wants it published.🤖 Generated with Claude Code