bentocache
bentocache copied to clipboard
Support Open telemetry through Node diagnostic channels
We want to support tracing via OpenTelemetry, and to achieve that, we will use Node's diagnostics_channel to keep the code optimized and also decoupled from OpenTelemetry itself. So we will have diagnostic channels used within the codebase itself, and an additional @bentocache/instrumentation plugin that exposes an Instrumentation usable with the Otel SDK.
Exactly like what was done for the Undici instrumentation, see: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-undici#observations