From e5b08b64ea99a0dad1ae0099f6f5b4fd43c5076e Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Tue, 8 Aug 2023 18:16:58 -0700 Subject: [PATCH] remove cancellation from http error reason --- docs/dotnet/dotnet-http-metrics.md | 2 +- docs/dotnet/dotnet-kestrel-metrics.md | 2 +- model/metrics/dotnet-http.yaml | 7 ++++--- model/metrics/dotnet-kestrel.yaml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/dotnet/dotnet-http-metrics.md b/docs/dotnet/dotnet-http-metrics.md index a6788decbc..8cb654e5d1 100644 --- a/docs/dotnet/dotnet-http-metrics.md +++ b/docs/dotnet/dotnet-http-metrics.md @@ -111,7 +111,7 @@ SHOULD NOT be set if capturing it would require an extra DNS lookup. | 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 | diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index d068e906f1..b02037743c 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -180,7 +180,7 @@ Meter name is `Microsoft.AspNetCore.Server.Kestrel` | 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` diff --git a/model/metrics/dotnet-http.yaml b/model/metrics/dotnet-http.yaml index b3292664ee..6d137ee989 100644 --- a/model/metrics/dotnet-http.yaml +++ b/model/metrics/dotnet-http.yaml @@ -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." diff --git a/model/metrics/dotnet-kestrel.yaml b/model/metrics/dotnet-kestrel.yaml index fceceaf1c9..0a69388582 100644 --- a/model/metrics/dotnet-kestrel.yaml +++ b/model/metrics/dotnet-kestrel.yaml @@ -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: