otel-cf-workers icon indicating copy to clipboard operation
otel-cf-workers copied to clipboard

[feature request]: Support for Cloudflare Pages

Open vanstinator opened this issue 11 months ago • 11 comments

We're starting to use Cloudflare Pages at Plex for a new layer in our API. We're also heavy users of Datadog, and would like to be able to auto-instrument our Pages codebase so we have e2e traces across our backend stack.

I've been hacking on some support for this, and we have it working internally. Would you be interested in a taking a PR that adds support for CF Pages auto-instrumentation?

I have an in-progress hacked together branch on my fork https://github.com/evanderkoogh/otel-cf-workers/compare/main...vanstinator:otel-cf-workers:feat/cf-pages

The code ended up being almost identical to the fetch instrumentation. I think it will be relatively trivial to clean up my exploration work and land on a solution that extends the fetch functionality with a few additional lines of code and another function export.

If this sounds good I can probably schedule work to productionize the patch in the next month or two.

vanstinator avatar Mar 23 '24 13:03 vanstinator