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

resync clock used for OTel timestamps periodically #215

Open
ty-elastic opened this issue Oct 23, 2023 · 0 comments
Open

resync clock used for OTel timestamps periodically #215

ty-elastic opened this issue Oct 23, 2023 · 0 comments

Comments

@ty-elastic
Copy link

Currently, the Android SDK syncs the clock used for OTel timestamps once at startup. This is good, but could potentially be problematic for apps running a long time.

Related, the Android emulator VM does a terrible job of keeping time. The system clock appears to run slow over time, and it doesn't itself correct to NTP. Thus, over 48h, I saw the clock slip 20s. This is unlikely to happen in a real device (which typically uses NTP or cellular clocks and generally has to maintain an accurate clock for auth purposes), but it highlights a potential problem.

This manifests itself in Kibana with a notable visual gap between trace data collected at the RUM device vs. related trace data collected from backend services (in distributed tracing scenarios).

Ideally, it seems, the Android SDK would periodically resync the NTP-based clock used for stamping OTel data. Maybe time-based (e.g., once/hour or once/min)?

screenshot_2023-10-23_at_10 26 54___am_720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants