sentry-java
sentry-java copied to clipboard
SentryNanotimeDate.nanoTimestamp does not provide nanosecond precision
Description
Came up when working on frame delay: https://github.com/getsentry/sentry-java/blob/eedcf5ac53387d44c99f17cdc472ce0bb18dfb31/sentry-android-core/src/main/java/io/sentry/android/core/SpanFrameMetricsCollector.java#L298-L307
@markushi this is a limitation on older Java SDKs and Android. If you have access to a better time source, you can provide a different SentryDate, e.g. SentryLongDate.
Let's close this one for now, as https://developer.android.com/reference/java/lang/System#nanoTime() doesn't really provide a date instance, but rather an arbitrary origin time, which is not useful for e.g. spans per se.
here's Alexes research https://github.com/getsentry/sentry-java/pull/2451#issuecomment-1396732246