Move error namespace to the registry (#500)
Co-authored-by: Alexander Wert <AlexanderWert@users.noreply.github.com>
This commit is contained in:
parent
3a8220c677
commit
e2952cf5a2
|
@ -33,6 +33,7 @@ Currently, the following namespaces exist:
|
|||
* [Container](container.md)
|
||||
* [Destination](destination.md)
|
||||
* [Device](device.md)
|
||||
* [Error](error.md)
|
||||
* [HTTP](http.md)
|
||||
* [Network](network.md)
|
||||
* [OCI](oci.md)
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!--- Hugo front matter used to generate the website version of this page:
|
||||
--->
|
||||
|
||||
# Error
|
||||
|
||||
## Error Attributes
|
||||
|
||||
<!-- semconv registry.error(omit_requirement_level) -->
|
||||
| Attribute | Type | Description | Examples |
|
||||
|---|---|---|---|
|
||||
| `error.type` | string | <br>Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` |
|
||||
|
||||
**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
|
||||
Instrumentations SHOULD document the list of errors they report.
|
||||
|
||||
The cardinality of `error.type` within one instrumentation library SHOULD be low.
|
||||
Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
||||
should be prepared for `error.type` to have high cardinality at query time when no
|
||||
additional filters are applied.
|
||||
|
||||
If the operation has completed successfully, instrumentations SHOULD NOT set `error.type`.
|
||||
|
||||
If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
|
||||
it's RECOMMENDED to:
|
||||
|
||||
* Use a domain-specific attribute
|
||||
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
||||
|
||||
`error.type` has the following list of well-known values. If one of them applies, then the respective value MUST be used, otherwise a custom value MAY be used.
|
||||
|
||||
| Value | Description |
|
||||
|---|---|
|
||||
| `_OTHER` | A fallback error value to be used when the instrumentation doesn't define a custom value. |
|
||||
<!-- endsemconv -->
|
|
@ -76,7 +76,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
|
|||
<!-- semconv metric.http.server.request.duration(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [3] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
|
||||
|
@ -239,7 +239,7 @@ This metric is optional.
|
|||
<!-- semconv metric.http.server.request.body.size(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [3] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
|
||||
|
@ -341,7 +341,7 @@ This metric is optional.
|
|||
<!-- semconv metric.http.server.response.body.size(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [3] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
|
||||
|
@ -449,7 +449,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
|
|||
<!-- semconv metric.http.client.request.duration(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [3] | `http`; `spdy` | Conditionally Required: [4] |
|
||||
|
@ -539,7 +539,7 @@ This metric is optional.
|
|||
<!-- semconv metric.http.client.request.body.size(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [3] | `http`; `spdy` | Conditionally Required: [4] |
|
||||
|
@ -629,7 +629,7 @@ This metric is optional.
|
|||
<!-- semconv metric.http.client.response.body.size(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.response.status_code`](../attributes-registry/http.md) | int | [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6). | `200` | Conditionally Required: If and only if one was received/sent. |
|
||||
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [3] | `http`; `spdy` | Conditionally Required: [4] |
|
||||
|
|
|
@ -118,7 +118,7 @@ sections below.
|
|||
<!-- semconv trace.http.common(full) -->
|
||||
| Attribute | Type | Description | Examples | Requirement Level |
|
||||
|---|---|---|---|---|
|
||||
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`error.type`](../attributes-registry/error.md) | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | Conditionally Required: If request has ended with an error. |
|
||||
| [`http.request.method`](../attributes-registry/http.md) | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
|
||||
| [`http.request.method_original`](../attributes-registry/http.md) | string | Original HTTP method sent by the client in the request line. | `GeT`; `ACL`; `foo` | Conditionally Required: [3] |
|
||||
| [`http.response.header.<key>`](../attributes-registry/http.md) | string[] | HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values. [4] | `http.response.header.content-type=["application/json"]`; `http.response.header.my-custom-header=["abc", "def"]` | Opt-In |
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
groups:
|
||||
- id: error
|
||||
- id: registry.error
|
||||
type: attribute_group
|
||||
prefix: error
|
||||
brief: >
|
||||
This document defines the shared attributes used to
|
||||
report an error.
|
||||
This document defines the shared attributes used to report an error.
|
||||
attributes:
|
||||
- id: type
|
||||
stability: stable
|
||||
brief: 'Describes a class of error the operation ended with.'
|
||||
brief: >
|
||||
Describes a class of error the operation ended with.
|
||||
type:
|
||||
allow_custom_values: true
|
||||
members:
|
||||
- id: other
|
||||
value: "_OTHER"
|
||||
brief: "A fallback error value to be used when the instrumentation doesn't define a custom value."
|
||||
brief: >
|
||||
A fallback error value to be used when the instrumentation doesn't define a custom value.
|
||||
examples: ['timeout', 'java.net.UnknownHostException', 'server_certificate_invalid', '500']
|
||||
note: |
|
||||
The `error.type` SHOULD be predictable and SHOULD have low cardinality.
|
||||
|
@ -29,5 +30,6 @@ groups:
|
|||
|
||||
If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),
|
||||
it's RECOMMENDED to:
|
||||
* Use a domain-specific attribute
|
||||
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
||||
|
||||
* Use a domain-specific attribute
|
||||
* Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
Loading…
Reference in New Issue