dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

[contrib/gocql] reporting both cluster and datacenter

Open ufoot opened this issue 11 months ago • 4 comments

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!

ufoot avatar Feb 26 '24 16:02 ufoot

Benchmarks

Benchmark execution time: 2024-07-09 08:15:04

Comparing candidate commit 1c2d7c28775828fdfffff8d0cb1f484b024da2bc in PR branch christian/gocql-report-cluster-name-and-datacenter with baseline commit 79fd68c25b9f9acd92339f653ce46440a7edca4c in branch main.

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

pr-commenter[bot] avatar Feb 26 '24 17:02 pr-commenter[bot]

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[bot] avatar Mar 18 '24 01:03 github-actions[bot]

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

github-actions[bot] avatar Apr 17 '24 01:04 github-actions[bot]

We'll have to introduce a mechanism to make sure customers expecting the old behaviour can keep using it.

We are discussing the best way to do this.

darccio avatar Jul 02 '24 12:07 darccio

@darccio @ufoot I went ahead and pushed some changes:

For users that are relying on the previous behavior and want to stay with it, they can set the env variable DD_TRACE_GOCQL_COMPAT=v1.65.

rarguelloF avatar Jul 08 '24 16:07 rarguelloF