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

fix: Inline kv.getWithMetadata() attributes to prevent exception #90

Closed jahands closed 4 months ago

jahands commented 4 months ago

KVAttributes functions don't have access to other functions, so we needed to inline functionality from get(argArray)

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

What this PR solves / how to test: Tested in a Worker that calls getWithMetadata and confirmed it no longer crashes