Skip to content

Commit

Permalink
Fix discrepancy between status names (open-telemetry#385)
Browse files Browse the repository at this point in the history
Fixes open-telemetry#384

Co-authored-by: Sergey Kanzhelev <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
  • Loading branch information
3 people authored and bogdandrutu committed Dec 25, 2019
1 parent af345ed commit 3052fa2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions specification/api-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
- The operation completed successfully.
- `Cancelled`
- The operation was cancelled (typically by the caller).
- `UnknownError`
- `Unknown`
- An unknown error.
- `InvalidArgument`
- Client specified an invalid argument. Note that this differs from
Expand Down Expand Up @@ -506,7 +506,7 @@ codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md):
fixed if the system state changes.
- `Unimplemented`
- Operation is not implemented or not supported/enabled in this service.
- `InternalError`
- `Internal`
- Internal errors. Means some invariants expected by underlying system has been
broken.
- `Unavailable`
Expand Down
10 changes: 5 additions & 5 deletions specification/data-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ Don't set a status message if the reason can be inferred from `http.status_code`
| 501 Not Implemented | `Unimplemented` |
| 503 Service Unavailable | `Unavailable` |
| 504 Gateway Timeout | `DeadlineExceeded` |
| Other 5xx code | `InternalError` [1] |
| Any status code the client fails to interpret (e.g., 093 or 573) | `UnknownError` |
| Other 5xx code | `Internal` [1] |
| Any status code the client fails to interpret (e.g., 093 or 573) | `Unknown` |

Note that the items marked with [1] are different from the mapping defined in the [OpenCensus semantic conventions][oc-http-status].

Expand Down Expand Up @@ -102,14 +102,14 @@ For status, the following special cases have canonical error codes assigned:

| Client error | Trace status code |
|-----------------------------|--------------------|
| DNS resolution failed | `UnknownError` |
| DNS resolution failed | `Unknown` |
| Request cancelled by caller | `Cancelled` |
| URL cannot be parsed | `InvalidArgument` |
| Request timed out | `DeadlineExceeded` |

This is not meant to be an exhaustive list
but if there is no clear mapping for some error conditions,
instrumentation developers are encouraged to use `UnknownError`
instrumentation developers are encouraged to use `Unknown`
and open a PR or issue in the specification repository.

## HTTP server
Expand Down Expand Up @@ -238,4 +238,4 @@ If set, it would be
`"https://example.com:8080/webshop/articles/4?s=1"`
but due to `http.scheme`, `http.host` and `http.target` being set, it would be redundant.
As explained above, these separate values are preferred but if for some reason the URL is available but the other values are not,
URL can replace `http.scheme`, `http.host` and `http.target`.
URL can replace `http.scheme`, `http.host` and `http.target`.

0 comments on commit 3052fa2

Please sign in to comment.