dd-trace-go
dd-trace-go copied to clipboard
contrib/net/http Add WithQueryParams option to include query params in the value for http.url tag in trace
What does this PR do?
- Add an option in the net/http tracer contrib package to toggle query parameters inclusion in the http.url span tag.
Motivation
- The
httputil.TracerConfigsupports theQueryParamsconfig but the same is not exposed as ahttp.Optionfunction in the contrib/net/http package.
Describe how to test/QA your changes
- Have added unit test which should test these changes.
Reviewer's Checklist
- [ ] If known, an appropriate milestone has been selected; otherwise the
Triagemilestone is set. - [x] Changed code has unit tests for its functionality.
- [ ] If this interacts with the agent in a new way, a system test has been added.
@knusbaum can you please approve the PR again? The review got dismissed after rebasing the PR.
Hi @abhishp, there are some small issues with the code not compiling (missing commas, wrong struct field name), feel free to ping me for a quick review after you fix those 🙌