Skip to content

CXXCBC-582: Add cluster labels & system tag in spans#682

Merged
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-582-cluster-labels
Oct 17, 2024
Merged

CXXCBC-582: Add cluster labels & system tag in spans#682
DemetrisChr merged 1 commit intocouchbase:mainfrom
DemetrisChr:CXXCBC-582-cluster-labels

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

Motivation

The Extended Observability RFC revision 25 requires us to record db.couchbase.cluster_name and db.couchbase.cluster_uuid in all spans created by the SDK.

Changes

  • Create a new core::tracing::tracer_wrapper class that watches for config updates and keeps track of cluster labels. We can expand is in the future to DRY creation of certain types of spans that we need to add (request_encoding, dispatch_to_server).
  • All spans created from the core, are created via the wrapper which always adds the db.system tag and the cluster labels if those are exposed by the cluster. All spans should have these 3 tags.
  • Replace all tracer references in the core with the tracer wrapper
  • Update assertions in tracing tests to check for db.system and cluster labels

Results

Tests pass

@DemetrisChr DemetrisChr force-pushed the CXXCBC-582-cluster-labels branch from 3ed4d5c to b89bcff Compare October 16, 2024 16:53
@DemetrisChr DemetrisChr force-pushed the CXXCBC-582-cluster-labels branch from b89bcff to 6db4880 Compare October 16, 2024 18:05
@DemetrisChr DemetrisChr merged commit c612b9c into couchbase:main Oct 17, 2024
@DemetrisChr DemetrisChr deleted the CXXCBC-582-cluster-labels branch October 17, 2024 08:29
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