-
Notifications
You must be signed in to change notification settings - Fork 173
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
Introduce request error type attribute #205
Introduce request error type attribute #205
Conversation
This sounded fine to me, perhaps "http.request.error.reason" -> http.client.error.reason or http.error.reason? What makes sense to me is that http.request.error.reason would encode errors that occurred locally and status_code covers errors that occurred remotely received via http response. This means all combinations of (error.reason is set or unset) x (status code is unset, status code is 200, status code is non-200) are possible. For span errors, I would guess you could have a span error if error.reason is set OR status_code == (whatever set of statuses are defined as errors). |
This might be a thing for a separate issue, but in the Java world I know of several HTTP instrumentations (Reactor Netty, Spring Webflux) that have knowledge if the request is cancelled, but they don't set the span status to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to cover a major gap we have.
One thing I want to call out -
Some metric backends treat absence of an attribute as an "empty" attribute. As such, we should probably REQUIRE that the reason is never empty, but also allow the "empty" means there was no reason.
@mateuszrzeszutek great point! I think span status |
e34d714
to
4fd9d38
Compare
@jsuereth |
The PR title still contains only "metrics" which might make some people skip over it that would want to look at tracing-related PRs |
Yes, this makes sense to me. Thanks!
👍 |
I think a common list (at least as recommendation for the most common ones) of error categories is achievable and is actually required if you want to have low cardinality in large systems with multiple techs. However, we should probably not come up with our own list but use an existing one, like https://en.cppreference.com/w/cpp/error/errc or https://pkg.go.dev/google.golang.org/grpc/codes |
Co-authored-by: Joao Grassi <[email protected]>
03db37e
to
e3eba94
Compare
e3eba94
to
a5b92c4
Compare
…p of status code, use numerical status code representation
a5b92c4
to
aa2dd45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client part LGTM.
Fixes #204
Proposal:
error.type
(TBD)Start with a small, non-controversial set of error types common across HTTP clients in different languages. Don't try to unify common errors initially. Even things like timeout (vs cancellation) can be controversial.(naming and common error suggestions are welcome!)
Error rate queries
rate(http_request_duration_count{error_type!=""}[1m]) by error_type