Content Deep Dive
Ask Miss O11y: OpenTelemetry in the Front End: Tracing Across Page Load
Blog post from Honeycomb
Post Details
Company
Date Published
Author
Jessica Kerr (Jessitron)
Word Count
306
Language
English
Hacker News Points
-
Summary
To measure the time a user waits between pressing a button and seeing the result across page loads, store the start time in sessionStorage when the button is pressed and retrieve it on the new page to start and end a trace span. This approach addresses the loss of span data caused by page loads, as the span is created on the new page with the start time explicitly set from the stored value. This method is effective for creating a single span that crosses pages, but for continuing an existing trace, additional context must also be stored in sessionStorage.