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

Fix discrepancy between status names #385

Merged
merged 3 commits into from
Dec 25, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.