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

Support configurable error reporting based on status code in net/http #2876

Closed
nakkamarra opened this issue Sep 17, 2024 · 1 comment
Closed
Assignees
Labels
enhancement quick change/addition that does not need full team approval

Comments

@nakkamarra
Copy link
Contributor

Many of the other frameworks supported in contrib offer something along the lines as what the echo dd-trace-go package offers here, where a user can provide a function to determine whether or not a given trace should be considered an error (i.e a user wants to report 400s as errors or want to not report a single specific code for some reason)

I suggest we support something similar here and update this check to use the new configured function instead. This way, explicit usage of TraceAndServe(...) can supply a function for it's ServeConfig (my use case), and the contrib/net/http package's dependence upon this function can also provide a functional option to it's ServeMux's configuration that can simply pass right through to this TraceAndServe function.

LMK what you think! Thanks

@nakkamarra nakkamarra added the enhancement quick change/addition that does not need full team approval label Sep 17, 2024
@github-actions github-actions bot added the needs-triage New issues that have not yet been triaged label Sep 17, 2024
@darccio darccio removed the needs-triage New issues that have not yet been triaged label Sep 26, 2024
@mtoffl01 mtoffl01 self-assigned this Sep 26, 2024
@mtoffl01
Copy link
Contributor

Responded on the PR #2882. Let's keep the discussion over there, and I will close this proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement quick change/addition that does not need full team approval
Projects
None yet
Development

No branches or pull requests

3 participants