evanderkoogh / otel-cf-workers

An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
238 stars 50 forks source link

Service worker syntax #51

Closed aivLuk closed 1 year ago

aivLuk commented 1 year ago

More of a question than an issue, does it work with service worker syntax?

addEventListener('fetch', event => {
  event.respondWith(new Response('Hello'));
});

If so, could there be an example on how it should be implemented?

evanderkoogh commented 1 year ago

Hey..

It currently does not support it and it is pretty far down my list of things to want to build.

having said that I would be more than happy to accept a PR if someone wants to add support for it.