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

New service bindings support triggers errors when service bindings not in use #59

Closed lboynton closed 1 year ago

lboynton commented 1 year ago

Version: 1.0.0-rc.13

I am not using service bindings, and get this error with the latest rc.13.

TypeError: Cannot read properties of undefined (reading 'connect')
    at isServiceBinding (index.js:5800:20)
    at Object.get (index.js:5812:18)
    at proxyHandler.get (index.js:4763:25)
    at Object.fetch (index.js:6300:78)
    at fetch (index.js:6222:25)
    at index.js:5902:30
    at AsyncLocalStorageContextManager.with (index.js:5008:36)
    at ContextAPI2.with (index.js:2194:53)
    at WorkerTracer.startActiveSpan (index.js:5225:24)
    at executeFetchHandler (index.js:5900:27) {
  stack: TypeError: Cannot read properties of undefined (re…24)
    at executeFetchHandler (index.js:5900:27),
  message: Cannot read properties of undefined (reading 'connect')