Closed jokull closed 11 months ago
Apologies for the delay, been a crazy couple of days, but could you give me a bit more information on what you are trying to do and what actually happens?
I think I figured it out. If you import instrument
without calling it, fetch
is undefined until instrument is called.
Now I'm doing:
if (ENV === "production") {
const instrument = (await import("@microlabs/otel-cf-workers")).instrument;
handler = instrument(handler, config);
}
With both RC6 and 7 my queue does not get processed. I'm using scheduled tasks to add to the queue and then consumer on the same worker code. I'm on holiday so I don't have a lot of spare time to create minimal reproductions, sorry about that, but thought I'd report this anyhow. I've removed otel for now - looking forward to having another look when I get back from my road trip.
Hmm.. the fetch being undefined when we import instrument, but not use it is certainly a bug. Will have a look at that.
And I’ll have a look at the queue thing as well. Thanks for reporting and enjoy the rest of the road trip!
You are correct that there was an issue if you import
ed instrument
, but didn't actually use it. Found the culprit and should have fixed it.
@jokull, I have tried the queue example myself and that worked just fine. Once you are back, could you try the latest version to check and make a new issue if it is still not working?
Will do! Thanks for looking into this
If I import
instrument
wrangler 3.3.0 (and 3.2.0) get fetch as undefined.