Skip to content

Commit 0ec1346

Browse files
authored
CXXCBC-719: Create top level KV operation spans in the Public API (#855)
1 parent 46cc8dd commit 0ec1346

15 files changed

+936
-427
lines changed

cmake/build_config.hxx.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@
2424
#cmakedefine COUCHBASE_CXX_CLIENT_BORINGSSL_SHA "@COUCHBASE_CXX_CLIENT_BORINGSSL_SHA@"
2525
#cmakedefine COUCHBASE_CXX_CLIENT_STATIC_BORINGSSL
2626
#cmakedefine COUCHBASE_CXX_CLIENT_COLUMNAR
27+
#cmakedefine COUCHBASE_CXX_CLIENT_CREATE_OPERATION_SPAN_IN_CORE

core/app_telemetry_meter.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "logger/logger.hxx"
1919
#include "meta/version.hxx"
2020
#include "topology/configuration.hxx"
21+
#include "utils/binary.hxx"
2122
#include "utils/json.hxx"
2223

2324
#include <spdlog/fmt/bin_to_hex.h>

core/cluster.cxx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,11 @@ class cluster_impl : public std::enable_shared_from_this<cluster_impl>
12381238
return { {}, session_manager_ };
12391239
}
12401240

1241+
auto tracer() const -> const std::shared_ptr<tracing::tracer_wrapper>&
1242+
{
1243+
return tracer_;
1244+
}
1245+
12411246
private:
12421247
void setup_observability()
12431248
{
@@ -2402,4 +2407,11 @@ cluster::to_string() const -> std::string
24022407
impl_ ? static_cast<const void*>(impl_.get()) : "(none)",
24032408
impl_ ? std::to_string(impl_.use_count()) : "(none)");
24042409
}
2410+
2411+
auto
2412+
cluster::tracer() const -> const std::shared_ptr<tracing::tracer_wrapper>&
2413+
{
2414+
return impl_->tracer();
2415+
}
2416+
24052417
} // namespace couchbase::core

core/cluster.hxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ namespace couchbase::core
3838
class crud_component;
3939
class cluster_impl;
4040

41+
namespace tracing
42+
{
43+
class tracer_wrapper;
44+
} // namespace tracing
45+
4146
namespace mcbp
4247
{
4348
class queue_request;
@@ -312,6 +317,8 @@ public:
312317

313318
[[nodiscard]] auto to_string() const -> std::string;
314319

320+
[[nodiscard]] auto tracer() const -> const std::shared_ptr<tracing::tracer_wrapper>&;
321+
315322
private:
316323
std::shared_ptr<cluster_impl> impl_;
317324
};

0 commit comments

Comments
 (0)