Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[contrib/gocql] reporting both cluster and datacenter #2577

Closed

Conversation

ufoot
Copy link
Member

@ufoot ufoot commented Feb 26, 2024

What does this PR do?

Report both cluster and datacenter.

  • Cluster is really the cluster name as in "the DB name".
  • Datacenter is a Cassandra specific notion, which can be used in some cases to host the same data on multiple datacenters, etc.

Quoting this Datastax doc An Apache Cassandra Datacenter is a group of nodes, related and configured within a cluster for replication purposes.

Also as a side quest it updates the CI image to 3.11 which:

  • is the latest of the 3.x series (soon unmaintained, but switching to 4.x is a bigger change)
  • has arm64 support out-of-the box, when the 3.7 was only amd64 compatible (at least this is what I witnessed on my laptop)

Motivation

Report more insightful metadata.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

@github-actions github-actions bot added the apm:ecosystem contrib/* related feature requests or bugs label Feb 26, 2024
@ufoot ufoot marked this pull request as ready for review February 26, 2024 16:50
@ufoot ufoot requested review from a team as code owners February 26, 2024 16:50
@pr-commenter
Copy link

pr-commenter bot commented Feb 26, 2024

Benchmarks

Benchmark execution time: 2024-02-26 17:01:49

Comparing candidate commit b4e7557 in PR branch christian/gocql-report-cluster-name-and-datacenter with baseline commit 6a6746f in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 40 metrics, 1 unstable metrics.

@@ -242,7 +242,8 @@ func (tq *Query) Iter() *Iter {
if tIter.Host() != nil {
tIter.span.SetTag(ext.TargetHost, tIter.Iter.Host().HostID())
tIter.span.SetTag(ext.TargetPort, strconv.Itoa(tIter.Iter.Host().Port()))
tIter.span.SetTag(ext.CassandraCluster, tIter.Iter.Host().DataCenter())
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be careful before merging this, as it can be a breaking change for anyone relying on the value of this tag.

Copy link

This PR is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Stuck for more than 1 month label Mar 18, 2024
Copy link

This PR was closed because it has been open for 30 days with no activity.

@github-actions github-actions bot closed this Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:ecosystem contrib/* related feature requests or bugs stale Stuck for more than 1 month
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants