dd-trace-go
dd-trace-go copied to clipboard
contrib/net/http: update orchestrion http client ResourceNamer
What does this PR do?
Leverage the newly introduced Quantizer in the Orchestrion HTTP client to have generic looking resource names in spans.
Motivation
We had a question from an orchestrion user asking us how they could customize the resource name. It is not currently possible with orchestrion to customize the RoundTripperConfig so providing users with a better ResourceNamer would makes things a bit better.
GET /v4/api/projects/1234/repository/files/my-file => GET /v4/api/projects/*/repository/files/*
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
golangci-lint runlocally. - [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.
- [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.
Unsure? Have a question? Request a review!
Benchmarks
Benchmark execution time: 2025-08-19 14:08:29
Comparing candidate commit 08b454630449d6f72419bdce10c481fc0d167914 in PR branch ben.db/APMAPI-1418-change-orchestrion-http-client-resource-namer with baseline commit 547cf8f19479e63439c1521a7d62676498c1252c in branch main.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.
/merge
View all feedbacks in Devflow UI.
2025-08-21 14:42:08 UTC :information_source: Start processing command /merge
2025-08-21 14:42:21 UTC :information_source: MergeQueue: pull request added to the queue
The expected merge time in main is approximately 14m (p90).
2025-08-21 14:55:10 UTC :information_source: MergeQueue: This merge request was merged