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

contrib/database/sql: allow peer.service to be set explicitly and add…

Open tabgok opened this issue 9 months ago • 1 comments

… into propagated context

What does this PR do?

This PR does two things:

  1. Adds peer.service to the SQL Connection context if set explicitly by a user via the Traced Connector Context or tag
  2. Adds ddprs=peer.service to the SQL Comment propagation when full mode is enabled

Motivation

This change allows the DBM and APM service maps to line up

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.

Unsure? Have a question? Request a review!

tabgok avatar May 01 '24 17:05 tabgok

Benchmarks

Benchmark execution time: 2024-05-22 14:35:14

Comparing candidate commit 26753a327273f245b3dc37f7c1b8fc4b6e775d64 in PR branch teague.bick/AIT-10033/dbm-peer-entity with baseline commit 14d15d518b02be36fedd99bc476126684de0699c in branch main.

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

pr-commenter[bot] avatar May 01 '24 17:05 pr-commenter[bot]

/merge

tabgok avatar May 22 '24 13:05 tabgok

:x: MergeQueue

You are not allowed to use the merge queue towards main.

If you need support, contact us on Slack #devflow with those details!

dd-devflow[bot] avatar May 22 '24 13:05 dd-devflow[bot]

@tabgok I'll handle the merge.

darccio avatar May 22 '24 14:05 darccio