Increase breadcrumb time precision to milliseconds #954
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.
Goal
Where there are breadcrumbs in the second before an error they are all displayed with the same time difference (0s before). Although the order is correct, it would be useful to show more precision when breadcrumbs occur close to the error.
Changeset
Altered the date format in
DateUtils
to include milliseconds as per the ISO 8601 standard. This does not fully update the NDK layer asdevice.time
usestime_t
in the public struct which is only accurate to milliseconds. The NDK layer will however use breadcrumbs and the sent-at header with millisecond precision.Testing
Updated unit tests to assert that milliseconds are included in the serialized timestamp. In addition, verified that the breadcrumb and device timestamp appear as expected for a handled JVM error and unhandled NDK error. Further verified that the NDK serialization change does not result in a crash loop by triggering an unhandled NDK error with v5.2.1, then installing a local artefact before relaunching the app and verifying that the report received by the dashboard was in the correct format.