Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib/net/http: NewServeMux does not respect WithResourceNamer option #1435

Closed
mccutchen opened this issue Aug 18, 2022 · 1 comment · Fixed by #1436
Closed

contrib/net/http: NewServeMux does not respect WithResourceNamer option #1435

mccutchen opened this issue Aug 18, 2022 · 1 comment · Fixed by #1436
Labels
bug unintended behavior that has to be fixed
Milestone

Comments

@mccutchen
Copy link
Contributor

The NewServeMux wrapper in the contrib/net/http package takes a slice of Options, but if the WithResoureNamer option is given it is ignored and a hard coded resource name is always used instead:

resource := r.Method + " " + route
TraceAndServe(mux.ServeMux, w, r, &ServeConfig{
Service: mux.cfg.serviceName,
Resource: resource,
SpanOpts: mux.cfg.spanOpts,
Route: route,
})

@katiehockman
Copy link
Contributor

Thanks for filing the issue and for the PR 👍

@katiehockman katiehockman added this to the 1.42.0 milestone Sep 2, 2022
@katiehockman katiehockman added the bug unintended behavior that has to be fixed label Sep 2, 2022
@knusbaum knusbaum modified the milestones: 1.42.0, 1.43.0 Sep 19, 2022
ajgajg1134 added a commit that referenced this issue Sep 28, 2022
Fixes #1435.

Co-authored-by: Andrew Glaude <andrew.glaude@datadoghq.com>
Hellzy pushed a commit that referenced this issue Sep 30, 2022
Fixes #1435.

Co-authored-by: Andrew Glaude <andrew.glaude@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behavior that has to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants