Queue consumer tail log missing event.request

Hey there! I'm currently working on implementing the Tail Event worker with Cloudflare Queue and encountered an issue. It seems that the event.request is only available on the fetch handler, while the queue handler only provides the following information:
"event": {
"batchSize": 1,
"queue": "queue"
},
"event": {
"batchSize": 1,
"queue": "queue"
},
I really need the request information to enhance the structure of my logs on the tail event log for sending them to New Relic. The request contains essential details about the client and the use case of the worker. Is there a way to include this request information in the output of the consumer? Any assistance or suggestions on how to handle this situation would be highly appreciated. Thank you!
1 Reply
kian
kian11mo ago
request is only available on fetch handlers since that's the only handler that responds to a HTTP request If you're sending to your queue from the fetch handler, just include the request in the queue message.