how to get the worker duration in a tail worker
would it be possible to have
TailItems
include the start/end timestamp for the worker? (or did i miss a field?)4 Replies
There's an
eventTimestamp
(in millis, https://workers-types.pages.dev/#TraceItem) that can get you halfway there, I believe it marks the start of the event, so if you add a console.log just before sending your response (waitUntil not included) you should be able to get a wall-time estimateso there's no way to get that without adding something to the app worker? 🤔
would be nice if this was added to the event.
I believe that it's part of the spectre mitigations to not tell you exactly how long a request took :/
ugh. that makes sense but also sucks.