apm: use url.template for OTLP HTTP client resource names - #54496
apm: use url.template for OTLP HTTP client resource names#54496niharikag09 wants to merge 5 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
jade-guiton-dd
left a comment
There was a problem hiding this comment.
Thank you for the PR.
be7a352 to
6e12b39
Compare
|
recheck |
jade-guiton-dd
left a comment
There was a problem hiding this comment.
Looks good, thank you!
|
recheck |
74e30ec to
e708eed
Compare
d041ebb to
50e2120
Compare
|
recheck |
|
Is someone internal shepherding this PR? It will never land with this many spurious approvers needed. You should reduce it to the teams that actually own the code. |
|
@jade-guiton-dd @aiuto Can you please remove the other code owners, I dont have permissions to remove |
@niharikag09 Sorry that I was not clear. I meant the DataDog employee shepherding this in should find the right owners and fix it. While I could do that, it should really belong to someone with knowledge of the OTel code. I'm just trying to work on process so that we don't let PRs like this stall forever. |
|
@IbraheemA can you please review this PR? |
|
I removed the spurious review requests. I'll ask for a review by agent-apm and semantic-core, since they seem to own the semantics library mappings. |
What does this PR do?
Uses the OpenTelemetry
url.templateattribute when generating resource names for HTTP client spans. Client spans now useMETHOD url.templatewhen available and retain the method-only fallback otherwise. Server spans continue to useMETHOD http.route.Both the current and legacy OTLP resource-name paths are covered to keep behavior consistent when operation/resource name V2 is disabled.
Fixes #31570.
Motivation
HTTP client resource names currently collapse to the HTTP method even when OpenTelemetry instrumentation provides a low-cardinality URL template. Using the template produces more useful resource grouping without falling back to high-cardinality raw URLs.
Testing
Added focused unit coverage for client URL templates, method-only fallback, and client/server attribute precedence.
Local
dda inv test --targets=./pkg/trace/api,./pkg/trace/otel/traceutilcould not run because Windows Defender quarantined the standalonedda.exeafter its PyPI bootstrap failed with a TLS handshake error. CI is expected to run the required test targets.Additional Notes
The current commit is unsigned because no local signing key is configured; it will need to be replaced with a signed commit before merge.