feat: support service source for 13integrations#4534
Conversation
404110d to
7b7622b
Compare
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 1e9720d | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
BenchmarksBenchmark execution time: 2026-03-13 17:30:26 Comparing candidate commit 1e9720d in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 157 metrics, 7 unstable metrics.
|
5551bcd to
bd16bba
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
bd16bba to
424d492
Compare
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
There was a problem hiding this comment.
💡 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)) |
There was a problem hiding this comment.
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 👍 / 👎.
What does this PR do?
New batch of integrations supporting service source, following #4526
Covered integrations
Screen on system-test account

Motivation
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!