evanderkoogh / otel-cf-workers

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

Allow disabling global fetch and cache instrumentation #130

Closed DaniFoldi closed 2 months ago

DaniFoldi commented 2 months ago

Fixes # [insert GH issue number(s)].

What this PR solves / how to test:

I was working on e2e tests for this package using the new vitest pool, and ran into a pile of errors when using fetch mocks and instrumented global fetch at the same time. To solve that (and possibly other issues), here's a config option to disable cache and fetch auto-instrumentation.