OpenTelemetry Span Timestamps: No Time‑Zone Context for Local Display
0 reputation · 07 Feb 2020, 13:39 UTC
Problem Statement
OpenTelemetry records span start and end times as 64‑bit nanosecond epoch values (e.g., start_time_unix_nano), which are implicitly UTC. The core specification does not attach a time‑zone identifier or civil date string to these timestamps.
Unresolved Decision
When a trace is consumed by a UI or exporter, the same epoch value may be rendered as different local times depending on the viewer’s locale. Because the source time zone is not conveyed, there is no standard way for backends to reconstruct the original local time of the event.
Key Questions
- Should OpenTelemetry introduce a standard attribute (e.g.,
source_time_zone) that propagates the host’s local time zone with each span? - If not, how should backends decide whether to display timestamps in UTC, the viewer’s local time, or the host’s local time?
- What best practices can be defined for exporters to preserve or annotate the original time zone context?