feat(tracer): add svc.user/svc.auto process tags to signal service name origin#4725
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f027ba19d5
ℹ️ 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".
| } else { | ||
| globalconfig.SetServiceName(c.internalConfig.ServiceName()) | ||
| } | ||
| processtags.SetServiceNameTag(c.internalConfig.ServiceName(), svcIsUserDefined) |
There was a problem hiding this comment.
Set service process tags outside tracer-only config
When an application enables only the profiler, this hook never runs, but profiler uploads still serialize processtags.GlobalTags().String() (profiler/upload.go) and the profiler derives its service from DD_SERVICE or filepath.Base(os.Args[0]) in profiler/options.go. Those standalone profile payloads will therefore continue to omit both svc.user and svc.auto, so the new signal is not actually propagated to all existing process-tag product payloads unless the tracer is also started.
Useful? React with 👍 / 👎.
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 6674510 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-05-06 07:53:04 Comparing candidate commit 6674510 in PR branch Found 3 performance improvements and 2 performance regressions! Performance is the same for 219 metrics, 9 unstable metrics.
|
kakkoyun
left a comment
There was a problem hiding this comment.
Looking good.
Let's use checklocks annotations.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
|
/merge |
|
View all feedbacks in Devflow UI.
PR already in the queue with status in_progress |
0643eb5
into
main
What does this PR do?
Adds two mutually exclusive process tags that signal to the Datadog backend whether the tracer's default service name was explicitly configured by the user or automatically assigned:
svc.user:true— the user explicitly set a service name (viaDD_SERVICE,OTEL_SERVICE_NAME,DD_TAGS,WithService(), orWithGlobalTag("service", ...))svc.auto:<name>— the tracer defaulted to the binary name because no service was configuredThe tags are set once during
tracer.Start()and propagated in all product payloads via the existing process tags mechanism.Motivation
Let the backend know when a name is auto-assigned or when it's user-defined in order to apply the best renaming rules for all the products that are already using process tags.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!