-
Notifications
You must be signed in to change notification settings - Fork 439
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/internal/httptrace: proposal: Add option to ignore setting errors for 5xx HTTP status codes #2390
Comments
I worked on #2432 @ajgajg1134 @katiehockman Hi, folks. I would be grateful if you could take some time to review it. |
Hi @kazukousen, thanks for filing this issue. We've been discussing this, and wonder if we should instead verify that there is not already an error status code and error tag on the span before we overwrite it. We're not sure that there is a good use case for overriding it, so rather than make this configurable, we should probably just fix this. Let us know what you think, and if this would fix your issue. We'll work on this and add some tests, and get back in touch with you. |
We're discussing adding a |
Hi @katiehockman, Thank you for your reply.
That's make sense for us. It is clear. Thanks! |
Hi there, We are still discussing how to handle the scenario where the tracer assigns an error to span that already has one. In the meantime, you can technically disable the tracer's automatic error status setter with the Some HTTP integrations support integration-level error code configuration, e.g, negroni and work is currently in progress to support this in the net/http contrib package. This is not yet supported nor in progress for the gorilla/mux integration. If you believe integration-level support for gorilla/mux would help you, let us know and we can consider prioritizing it as a temporary fix for you. |
Only errors located in the uppermost service span are processed by ErrorTracking.
We use
tracer.SetTag(ext.Error, err)
to record error in the uppermost service span.However, the gorilla/mux tracer we use which internally uses http tracer, also overrides the error with
tracer.SetTag()
when the HTTP Errors (5xx) occur.dd-trace-go/contrib/internal/httptrace/httptrace.go
Lines 74 to 76 in 6becedc
As a result, ErrorTracking groups all errors into a generic 5xx error issue, displays examples like
500: Internel Server Error
in its web UI.We'd like discuss about adding an option to ignore setting the error. this could be implemented as follows:
The text was updated successfully, but these errors were encountered: