Skip to content

Commit

Permalink
Clarify fully-qualified name should be used for error.type (#945)
Browse files Browse the repository at this point in the history
Co-authored-by: Liudmila Molkova <[email protected]>
  • Loading branch information
joaopgrassi and lmolkova authored Apr 23, 2024
1 parent dd73dba commit 8d6f12b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/attributes-registry/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
|---|---|---|---|---|
| `error.type` | string | Describes a class of error the operation ended with. [1] | `timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
**[1]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.

When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand Down
6 changes: 5 additions & 1 deletion docs/dotnet/dotnet-aspnetcore-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ Exceptions Metric is reported by the `Microsoft.AspNetCore.Diagnostics` meter.
| [`error.type`](../attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `aspnetcore.diagnostics.handler.type` | string | Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception. | `Contoso.MyHandler` | `Conditionally Required` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
**[1]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.

When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand Down
6 changes: 5 additions & 1 deletion docs/messaging/messaging-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ All messaging metrics share the same set of attributes:
| [`messaging.destination.partition.id`](../attributes-registry/messaging.md) | string | The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`. | `1` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`server.port`](../attributes-registry/server.md) | int | Server port number. [7] | `80`; `8080`; `443` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
**[1]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.

When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand Down
6 changes: 5 additions & 1 deletion docs/messaging/messaging-spans.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,11 @@ as described in [Attributes specific to certain messaging systems](#attributes-s

**[1]:** If a custom value is used, it MUST be of low cardinality.

**[2]:** The `error.type` SHOULD be predictable and SHOULD have low cardinality.
**[2]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.

When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.

Instrumentations SHOULD document the list of errors they report.

The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand Down
6 changes: 5 additions & 1 deletion model/registry/error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ groups:
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.
The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
When `error.type` is set to a type (e.g., an exception type), its
canonical class name identifying the type within the artifact SHOULD be used.
Instrumentations SHOULD document the list of errors they report.
The cardinality of `error.type` within one instrumentation library SHOULD be low.
Expand Down

0 comments on commit 8d6f12b

Please sign in to comment.