|
typeof this._tracer !== 'undefined' || !tracingExplicitlyDisabled |
Since couchbase has decided to instrument the code with OTEL from within the library, that makes it impossible for many consumers to enable OTEL for couchbase across many of their services in a "No-Code" fashion.
To enable otel, the connect configurations may need to be changed across hundreds of services, therefore lengthening the path for customers to enable OTEL, whereas instrumentation libraries allow for a high degree of separation of telemetry intialization & business code.
Therefore please consider 2 points:
- allow tracing config to be configured from env vars (OTEL_CB_TRACING: true or infer that OTEL is enabled from OTEL supported env vars)
- default to fetch the tracer from a registered tracer provider through OTEL trace api.
Those changes would allow customers to benefit from OTEL without any changes to their code.
couchnode/lib/cluster.ts
Line 1080 in 7378b6e
Since couchbase has decided to instrument the code with OTEL from within the library, that makes it impossible for many consumers to enable OTEL for couchbase across many of their services in a "No-Code" fashion.
To enable otel, the connect configurations may need to be changed across hundreds of services, therefore lengthening the path for customers to enable OTEL, whereas instrumentation libraries allow for a high degree of separation of telemetry intialization & business code.
Therefore please consider 2 points:
Those changes would allow customers to benefit from OTEL without any changes to their code.