I created a small log implementation to log all my log entries to Loggly. The logging seems to work just perfect when I hit my web worker via the preview GUI. When I do that, I can see all the entries in Loggly.
But when I deploy the code, and try to hit the live webworker, even waiting 10 minutes to make the web worker is deployed everywhere, I don’t receive any log entries in Loggly.
The first thing I would try is to check the response of the fetch. If the service is not live, you could simply return that to the user add it to the response header as described here.
I have tried different content-type headers, but the given header is how the loggly docs instruct. I did try to just catch the response of my log action and return that response. In preview I get a 200, but in production I get a 400 Bad Request response. So this makes me wonder if the Cloud Flare web workers modifies the request in the live environment versus the preview environment.
This is the code I use to test, in preview it works, in production I get a 400