Closed rtbenfield closed 1 year ago
Absolutely! Put it in!
I also took a quick look at our LogPush logs for queue messages to see if there was an equivalent value to use there. It doesn't look like they are assigned an identifier per invocation. Do you know if there's a value I'm overlooking?
To my knowledge, there is no way to uniquely identify a non-fetch handler being run, like the cf-ray header on fetch requests. The best would probably be generating a uuid/nanoid/similar.
Would you be interested in incorporating the CF-Ray header from Cloudflare into the span attributes of
fetchHandler
? The semantic attributes package offersfaas.execution
, which seems fitting for this and is what I have used previously. The JSDoc describes the attribute as "The execution ID of the current function execution.".It's not difficult to add this in userland either, but it's been so successful for correlation with LogPush jobs that I thought incorporating it by default might help others 🙂
I'm happy to raise a PR for this if it would be fitting for the package.