From 3052fa2b606b462671beb8358bff9c324972835b Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Wed, 25 Dec 2019 10:17:10 -0600 Subject: [PATCH] Fix discrepancy between status names (#385) Fixes #384 Co-authored-by: Sergey Kanzhelev Co-authored-by: Bogdan Drutu --- specification/api-tracing.md | 4 ++-- specification/data-http.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/api-tracing.md b/specification/api-tracing.md index 88cc1186916..cd1e1342f5f 100644 --- a/specification/api-tracing.md +++ b/specification/api-tracing.md @@ -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 @@ -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` diff --git a/specification/data-http.md b/specification/data-http.md index 273d0138b81..84de73c4a89 100644 --- a/specification/data-http.md +++ b/specification/data-http.md @@ -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]. @@ -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 @@ -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`. \ No newline at end of file +URL can replace `http.scheme`, `http.host` and `http.target`.