Skip to content

Conversation

@DemetrisChr
Copy link
Contributor

Motivation

As part of the observability work, we should add Meter and Tracer implementations that allow easy integration with OpenTelemetry.

Changes

  • Add OpenTelemetryRequestTracer and OpenTelemetryMeter. Both will be shipped as part of the couchbase-opentelemetry gem
  • Add tests using OpenTelemetry's in-memory exporters
  • Add status on request tracers.
  • Add TracerError and MeterError that wrap any errors coming from the wrapped Otel tracer/meter.

DemetrisChr and others added 3 commits January 22, 2026 17:43
Update the gemspec replacement pattern from `/gemspec/` to `/gemspec$/`
to ensure it only matches "gemspec" at the end of lines. This prevents
potential partial matches that could cause incorrect Gemfile
modifications during the test gem installation process.

The $ anchor makes the regex more precise and robust for the automated
gem unpacking and bundling workflow.
The bucket_name parameter was missing from the fmt::format call in
cb_Backend_query_index_build_deferred, causing the error message
to not include the bucket name when reporting deferred index build
failures. Which in turn caused build failure with recent GCC, where
fmtlib tries to validate format strings compile-time.
COUCHBASE_GEM_PATH=$(realpath couchbase-*.gem)
UNPACKED_GEM_PATH=$(gem unpack ${COUCHBASE_GEM_PATH} | grep "Unpacked gem" | cut -d "'" -f 2)
gem unpack --spec --target ${UNPACKED_GEM_PATH} ${COUCHBASE_GEM_PATH}
ruby -i.bak -pe "gsub(/gemspec/, 'gem \"couchbase\", path: \"${UNPACKED_GEM_PATH}\"')" Gemfile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DemetrisChr somehow we need to figure out proper fix here. The idea is to use specific precompiled gem for the tests and avoid fetching it from the repository.

Maybe some other solution will fit better here. Like

gem install ${COUCHBASE_GEM_PATH}

and then, point bundler to use it from there.

or from the different angle, create local gem repository like

mkdir -p my-local-repo/gems
cp ${COUCHBASE_GEM_PATH} my-local-repo/gems/
gem generate_index --verbose --directory my-local-repo/

And then patch Gemfile to use something like

gem "couchbase", path: "my-local-repo/"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants