fix(gorm): respect DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED#4618
Conversation
The gorm.io/gorm.v1 contrib package hardcodes "gorm.db" as the service name, ignoring DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED. This causes gorm.db to appear as a separate service in Datadog APM even when the env var is set to true. Fix by: 1. Adding a naming schema to PackageGormIOGormV1 in packages.go (matching the pattern used by PackageJackcPGXV5) 2. Using instr.ServiceName() instead of the hardcoded string in option.go (matching contrib/jackc/pgx.v5/option.go) Fixes #4578
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 8b76013 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-04-08 17:52:33 Comparing candidate commit 8b76013 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 216 metrics, 8 unstable metrics.
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Tests failed on this commit 4986972: What to do next?
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Tests failed on this commit 556d613: What to do next?
|
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
Tests failed on this commit 291847a:
What to do next?
|
What does this PR do?
(continuation of #4579)
The gorm.io/gorm.v1 contrib package hardcodes "gorm.db" as the service
name, ignoring DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED. This
causes gorm.db to appear as a separate service in Datadog APM even when
the env var is set to true.
Fix by:
(matching the pattern used by PackageJackcPGXV5)
option.go (matching contrib/jackc/pgx.v5/option.go)
Fixes #4578
Motivation
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!