You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resource and navigation timing event timestamps should use the entry's start time #496
The resource timing and navigation timing instrumentations emit their events without setting timestamp (resource timing, navigation timing). The SDK then defaults the timestamp to emission time (LogRecordImpl.ts).
For navigation timing, the event is emitted after load (with retries until the entry is complete), so it's stamped at emit time rather than at the start of the navigation. The semconv doesn't specify a timestamp for this event yet, but using the entry's startTime (always 0, i.e. timeOrigin) would be consistent with resource timing.
Fix: set timestamp: entry.startTime in both instrumentations. The SDK converts it to an absolute time, the same way the web-vitals instrumentation already does.
Tests should use a nonzero startTime for resource timing and assert the exported timestamp equals timeOrigin + startTime when:
the idle callback runs after the clock has advanced
visibilitychange flushes the queue before the callback runs
disable() flushes the queue before the callback runs
For navigation timing, assert the exported timestamp equals timeOrigin when the event is emitted after a delay or after retries.
Activity