couchbase / couchbase/couchnode

Facilitate no-code instrumentation

Open
#150 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
462
Forks
225
PR merge metrics
No merged PRs in 30d

Description

https://github.com/couchbase/couchnode/blob/7378b6e1d2681b9b52f547c36eb3df1971f98fbc/lib/cluster.ts#L1080

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at lib/cluster.ts around line 1080 and review how tracing is configured during connection setup. Check the linked OpenTelemetry SDK environment-variable specification and the OpenTelemetry trace API. Done means tracing can be enabled through supported environment variables and the tracer is obtained from a registered provider without changing consumer connection configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.