Obtaining requestId in Email Worker.

How can I obtain the Cloudflare requestId within an Email Worker? The ctx object doesn't contain it. What does? The $workers and $metadata objects contain the requestId when logs are enabled, but how do I access these programmatically?
4 Replies
SuperHelpflare
SuperHelpflare2mo ago
Feedback
Feedback has been submitted! Thank you :)
Hello, I’m Allie!
IIRC they are randomly generated by Observability, and aren’t available in the runtime itself. I can try verifying on Tuesday, when the team is back online?
pkroma
pkromaOP2mo ago
Thanks @Hello, I’m Allie!, that would be great!
Hello, I’m Allie!
@Hard@Work for Tuesday

Did you find this page helpful?