Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase breadcrumb time precision to milliseconds #954

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Oct 15, 2020

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 as device.time uses time_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.

Screenshot 2020-10-15 at 16 12 44

@fractalwrench fractalwrench force-pushed the PLAT-5192/breadcrumb-time-precision branch from acd0c90 to ede4e3d Compare October 15, 2020 14:45
@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Oct 15, 2020

Android notifier sizes

Format Size impact of Bugsnag (kB) Size impact of Bugsnag when Minified (kB)
APK 1437.58 1358.8
arm64_v8a 369.25 287.33
armeabi 348.77 266.85
armeabi_v7a 328.29 250.46
x86 406.1 324.18
x86_64 389.73 307.81

Generated by 🚫 Danger

@fractalwrench fractalwrench marked this pull request as ready for review October 15, 2020 15:58
@fractalwrench
Copy link
Contributor Author

I've noticed that the precision is off for unhandled NDK errors so this will need some additional changes.

@fractalwrench fractalwrench force-pushed the PLAT-5192/breadcrumb-time-precision branch from 3ef8c7c to 4d3636b Compare October 16, 2020 14:32
Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fractalwrench fractalwrench force-pushed the PLAT-5192/breadcrumb-time-precision branch from 4d3636b to d9f48d3 Compare October 19, 2020 15:26
@fractalwrench fractalwrench merged commit 649ebce into next Oct 20, 2020
@fractalwrench fractalwrench deleted the PLAT-5192/breadcrumb-time-precision branch October 20, 2020 12:13
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.

4 participants