Skip to content

feat: support service source for 13integrations#4534

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
raphael/3rd_batch
Mar 13, 2026
Merged

feat: support service source for 13integrations#4534
gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits into
mainfrom
raphael/3rd_batch

Conversation

@raphaelgavache

@raphaelgavache raphaelgavache commented Mar 12, 2026

Copy link
Copy Markdown
Member

What does this PR do?

New batch of integrations supporting service source, following #4526

Covered integrations

  • gorilla/mux
  • httptree
  • mgo
  • go_pg
  • graphgopher
  • graphql
  • hashicorp
  • ibm_sarama
  • shopify_sarama
  • julienschmidt_http_router
  • segmentio_kafka
  • twirp
  • confluent

Screen on system-test account
Screenshot 2026-03-13 at 11 56 46

Motivation

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.
  • New code is free of linting errors. You can check this by running make lint locally.
  • New code doesn't break existing tests. You can check this by running make test locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • All generated files are up to date. You can check this by running make generate locally.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running make fix-modules locally.

Unsure? Have a question? Request a review!

@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label Mar 12, 2026
@raphaelgavache raphaelgavache force-pushed the raphael/3rd_batch branch 4 times, most recently from 404110d to 7b7622b Compare March 13, 2026 15:14
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Mar 13, 2026

Copy link
Copy Markdown

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 59.29%

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1e9720d | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@raphaelgavache raphaelgavache changed the title feat: support service source for 20 integrations feat: support service source for 11 integrations Mar 13, 2026
@pr-commenter

pr-commenter Bot commented Mar 13, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-13 17:30:26

Comparing candidate commit 1e9720d in PR branch raphael/3rd_batch with baseline commit 297f9ab in branch main.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@raphaelgavache raphaelgavache changed the title feat: support service source for 11 integrations feat: support service source for 13integrations Mar 13, 2026
@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.06%. Comparing base (297f9ab) to head (1e9720d).

Additional details and impacted files

see 434 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@raphaelgavache raphaelgavache marked this pull request as ready for review March 13, 2026 16:15
@raphaelgavache raphaelgavache requested review from a team as code owners March 13, 2026 16:15
@raphaelgavache

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@raphaelgavache

Copy link
Copy Markdown
Member Author

@codex review

@raphaelgavache raphaelgavache added the AI Assisted AI/LLM assistance used in this PR (partially or fully) label Mar 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 424d4929f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
resource := r.config.resourceNamer(r.TreeMux, w, req)
route, _ := getRoute(r.TreeMux, w, req)
spanOpts := append(r.config.spanOpts, instrumentation.ServiceNameWithSource(r.config.serviceName, r.config.serviceSource))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Copy router span options before appending per request

Appending to r.config.spanOpts here can mutate the shared router configuration slice when it has spare capacity, so concurrent requests may race while writing the service-source option; the same pattern is also present in ContextRouter.ServeHTTP. Because these handlers run concurrently in normal HTTP servers, this introduces undefined behavior (and race-detector failures) under load. Create a request-local copy of the options (e.g., via options.Expand/options.Copy) before appending.

Useful? React with 👍 / 👎.

@gh-worker-dd-mergequeue-cf854d gh-worker-dd-mergequeue-cf854d Bot merged commit 215fa63 into main Mar 13, 2026
183 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Assisted AI/LLM assistance used in this PR (partially or fully) apm:ecosystem contrib/* related feature requests or bugs mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants