-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Use float
instead of Date
for protocol types for higher precision.
#1737
Conversation
Codecov Report
@@ Coverage Diff @@
## 6.x.x #1737 +/- ##
============================================
+ Coverage 80.93% 80.98% +0.05%
- Complexity 2822 2835 +13
============================================
Files 205 205
Lines 10360 10405 +45
Branches 1370 1376 +6
============================================
+ Hits 8385 8427 +42
Misses 1493 1493
- Partials 482 485 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks so much better in the UI 💯
btw:
that means when the device is in sleep mode, the system does not increase the timer, is it possible that it'd cause off-by-1 sort of problems? https://developer.android.com/reference/android/os/SystemClock search for |
sentry/src/main/java/io/sentry/adapters/DoubleDeserializerAdapter.java
Outdated
Show resolved
Hide resolved
sentry/src/main/java/io/sentry/adapters/DoubleSerializerAdapter.java
Outdated
Show resolved
Hide resolved
Are our transactions meant to span over the system sleep? If so, we should at least check if the |
good question and I don't know the answer right now, have to check if it makes sense or not |
should we target the v6 branch then? |
Yes but this PR is anyway on hold until we have JSON serialization merged. |
JSON PR is getting to its final form so might be time to point this to that branch and merge? |
Just to avoid double work - once JSON PR is merged to |
Gson PR merged into branch |
6.x.x is now up to date with main, this PR is now pointing to 6.x.x. Ready for the final review. |
@romtsn would you like to have a look? |
@marandaneto checking 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📜 Description
Use
float
instead ofDate
for protocol types for higher precision.To retrieve more precise timestamps, we are using
System#nanoTime
as it's the only method available both on Android and JVM.When Span is created with given start timestamp (for example with Android app start time), we are not able to measure high precision timestamp, we fall back then to regular timestamp with milliseconds precision.
How it looks in UI:
💡 Motivation and Context
Fixes #1689
💚 How did you test it?
Unit & integration tests.
📝 Checklist