Skip to content

Commit

Permalink
remove cancellation from http error reason
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Aug 9, 2023
1 parent 3910f8a commit e5b08b6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/dotnet/dotnet-http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ SHOULD NOT be set if capturing it would require an extra DNS lookup.
<!-- semconv metric.dotnet.http.client.request.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `http.error.reason` | string | "Low-cardinality error reason: `cancellation` or one of [HTTP Request errors](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs)" [1] | `cancellation`; `name_resolution_error`; `secure_connection_error` | Conditionally Required: If request has failed. |
| `http.error.reason` | string | Low-cardinality error reason: one of [HTTP Request errors](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs), or a full type of exception that happened during request execution [1] | `System.OperationCanceledException`; `name_resolution_error`; `secure_connection_error` | Conditionally Required: If request has failed. |
| `http.request.method` | string | HTTP request method. [2] | `GET`; `POST`; `HEAD` | Required |
| `http.response.status_code` | 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.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [3] | `1.1`; `2` | Recommended |
Expand Down
2 changes: 1 addition & 1 deletion docs/dotnet/dotnet-kestrel-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Meter name is `Microsoft.AspNetCore.Server.Kestrel`
<!-- semconv metric.kestrel.queued_requests(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `kestrel.queued_requests` | UpDownCounter | `{connection}` | Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. [1] |
| `kestrel.queued_requests` | UpDownCounter | `{request}` | Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start. [1] |

**[1]:** Meter name is `Microsoft.AspNetCore.Server.Kestrel`
<!-- endsemconv -->
Expand Down
7 changes: 4 additions & 3 deletions model/metrics/dotnet-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ groups:
- ref: http.request.method
- ref: http.response.status_code
- ref: http.error.reason
examples: ['cancellation', 'name_resolution_error', 'secure_connection_error']
examples: ['System.OperationCanceledException', 'name_resolution_error', 'secure_connection_error']
brief: >
"Low-cardinality error reason: `cancellation` or one of
[HTTP Request errors](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs)"
Low-cardinality error reason: one of
[HTTP Request errors](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs),
or a full type of exception that happened during request execution
note: "**TODO: there is a [open discussion/proposal in otel for http error code](https://github.com/open-telemetry/semantic-conventions/pull/205)**
Errors SHOULD be reported in snake_case."

Expand Down
2 changes: 1 addition & 1 deletion model/metrics/dotnet-kestrel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ groups:
metric_name: kestrel.queued_requests
brief: Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start.
instrument: updowncounter
unit: "{connection}"
unit: "{request}"
note: Meter name is `Microsoft.AspNetCore.Server.Kestrel`
extends: common.kestrel.attributes
attributes:
Expand Down

0 comments on commit e5b08b6

Please sign in to comment.