From f85bfa87ba9cc7b6f4d56d336941ffe05b4f30f8 Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Thu, 27 Jul 2023 16:46:28 -0700 Subject: [PATCH] lint --- docs/dotnet/dotnet-aspnet-metrics.md | 22 +++++++++++++++++----- docs/dotnet/dotnet-dns-metrics.md | 1 - docs/dotnet/dotnet-http-metrics.md | 6 ++---- docs/dotnet/dotnet-kestrel-metrics.md | 4 ++-- docs/dotnet/dotnet-signalr-metrics.md | 3 +-- model/metrics/dotnet-aspnet.yaml | 2 +- model/metrics/dotnet-http.yaml | 5 +++-- model/metrics/dotnet-kestrel.yaml | 2 +- model/metrics/dotnet-signalr.yaml | 2 +- 9 files changed, 28 insertions(+), 19 deletions(-) diff --git a/docs/dotnet/dotnet-aspnet-metrics.md b/docs/dotnet/dotnet-aspnet-metrics.md index 9c0ceb0379..1fa600730d 100644 --- a/docs/dotnet/dotnet-aspnet-metrics.md +++ b/docs/dotnet/dotnet-aspnet-metrics.md @@ -19,7 +19,7 @@ This document defines semantic conventions for ASP.NET Core metrics, not specifi * [Metric: `aspnet.rate_limiting.request_lease.duration`](#metric-aspnetrate_limitingrequest_leaseduration) * [Metric: `aspnet.rate_limiting.queued_requests`](#metric-aspnetrate_limitingqueued_requests) * [Metric: `aspnet.rate_limiting.queued_requests.duration`](#metric-aspnetrate_limitingqueued_requestsduration) - * [Metric: `aspnet.rate_limiting.requests`](#metric-aspnetrate_limitingrejected_requests) + * [Metric: `aspnet.rate_limiting.requests`](#metric-aspnetrate_limitingrequests) @@ -133,6 +133,9 @@ All rate-limiting metrics are reported by `Microsoft.AspNetCore.RateLimiting` me +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `aspnet.rate_limiting.policy` | string | TODO | `TODO` | Required | ### Metric: `aspnet.rate_limiting.queued_requests` @@ -160,13 +163,23 @@ All rate-limiting metrics are reported by `Microsoft.AspNetCore.RateLimiting` me **[1]:** Meter name is `Microsoft.AspNetCore.RateLimiting` -**TODO: I don't really understand what this duration is, can we improve name, brief or description to explain? ** +**TODO: I don't really understand what this duration is, can we improve name, brief or description to explain?** | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `aspnet.rate_limiting.policy` | string | TODO | `TODO` | Required | +| `aspnet.rate_limiting.result` | string | Rate-limiting result, shows whether lease was acquired or contains rejection reason | `acquired`; `request_canceled` | Required | + +`aspnet.rate_limiting.result` 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 | +|---|---| +| `acquired` | lease acquired | +| `endpoint_limiter` | Lease request was rejected by the endpoint limiter | +| `global_limiter` | Lease request was rejected by the global limiter | +| `request_canceled` | Lease request was canceled | ### Metric: `aspnet.rate_limiting.requests` @@ -185,7 +198,7 @@ Meter name is `Microsoft.AspNetCore.RateLimiting` | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| | `aspnet.rate_limiting.policy` | string | TODO | `TODO` | Required | -| `aspnet.rate_limiting.result` | string | Rate-limiting result, shows whether lease was acquired or contains rejection reason | `acquired`; `request_canceled` | Recommended | +| `aspnet.rate_limiting.result` | string | Rate-limiting result, shows whether lease was acquired or contains rejection reason | `acquired`; `request_canceled` | Required | `aspnet.rate_limiting.result` 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. @@ -197,5 +210,4 @@ Meter name is `Microsoft.AspNetCore.RateLimiting` | `request_canceled` | Lease request was canceled | - -[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md \ No newline at end of file +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/docs/dotnet/dotnet-dns-metrics.md b/docs/dotnet/dotnet-dns-metrics.md index aff98194fb..e19d861c11 100644 --- a/docs/dotnet/dotnet-dns-metrics.md +++ b/docs/dotnet/dotnet-dns-metrics.md @@ -39,5 +39,4 @@ Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively. - [DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/docs/dotnet/dotnet-http-metrics.md b/docs/dotnet/dotnet-http-metrics.md index 2b59ef781b..31a1582657 100644 --- a/docs/dotnet/dotnet-http-metrics.md +++ b/docs/dotnet/dotnet-http-metrics.md @@ -217,7 +217,6 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | - ### Metric: `http.client.active_requests` @@ -273,7 +272,7 @@ Tracing instrumentations that do so, MUST also set `http.request.method_original ## HTTP server -All Http server metrics are reported by `Microsoft.AspNetCore.Hosting ` meter. +All Http server metrics are reported by `Microsoft.AspNetCore.Hosting` meter. ### Metric: `http.server.duration` @@ -354,7 +353,6 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | - ### Metric: `http.server.active_requests` **TODO: Opt-in address and port?** @@ -417,4 +415,4 @@ SHOULD include the [application root](/docs/http/http-spans.md#http-server-defin | `_OTHER` | Any HTTP method that the instrumentation has no prior knowledge of. | -[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md \ No newline at end of file +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/docs/dotnet/dotnet-kestrel-metrics.md b/docs/dotnet/dotnet-kestrel-metrics.md index 6400f91752..8e8c203474 100644 --- a/docs/dotnet/dotnet-kestrel-metrics.md +++ b/docs/dotnet/dotnet-kestrel-metrics.md @@ -143,7 +143,7 @@ Meter name is `Microsoft.AspNetCore.Server.Kestrel` | -------- | --------------- | ----------- | -------------- | | `aspnet.kestrel.upgraded_connections` | UpDownCounter | `{connection}` | Number of connections that are currently upgraded (WebSockets). . [1] | -**[1]:** The number only tracks HTTP/1.1 connections. **TODO: can we add protocol info in dimensions so we can extend it to other versions/protocols? ** +**[1]:** The number only tracks HTTP/1.1 connections. **TODO: can we add protocol info in dimensions so we can extend it to other versions/protocols?** Meter name is `Microsoft.AspNetCore.Server.Kestrel` @@ -209,4 +209,4 @@ Meter name is `Microsoft.AspNetCore.Server.Kestrel` `url.full` SHOULD capture the absolute URL when it is available (or can be reconstructed) and SHOULD NOT be validated or modified except for sanitizing purposes. -[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md \ No newline at end of file +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/docs/dotnet/dotnet-signalr-metrics.md b/docs/dotnet/dotnet-signalr-metrics.md index 2f686d400c..a0781c6c2b 100644 --- a/docs/dotnet/dotnet-signalr-metrics.md +++ b/docs/dotnet/dotnet-signalr-metrics.md @@ -79,5 +79,4 @@ This document defines semantic conventions for SignalR metrics emitted by .NET c | `web_sockets` | WebSockets protocol | - -[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md \ No newline at end of file +[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md diff --git a/model/metrics/dotnet-aspnet.yaml b/model/metrics/dotnet-aspnet.yaml index 684db8ed16..10f32838c3 100644 --- a/model/metrics/dotnet-aspnet.yaml +++ b/model/metrics/dotnet-aspnet.yaml @@ -169,7 +169,7 @@ groups: note: | Meter name is `Microsoft.AspNetCore.RateLimiting` - **TODO: I don't really understand what this duration is, can we improve name, brief or description to explain? ** + **TODO: I don't really understand what this duration is, can we improve name, brief or description to explain?** attributes: - ref: aspnet.rate_limiting.policy - ref: aspnet.rate_limiting.result diff --git a/model/metrics/dotnet-http.yaml b/model/metrics/dotnet-http.yaml index ba1a9352b4..5a74251a3d 100644 --- a/model/metrics/dotnet-http.yaml +++ b/model/metrics/dotnet-http.yaml @@ -32,9 +32,10 @@ groups: - id: extended_connection_not_supported value: 'extended_connection_not_supported' brief: 'ExtendedConnectNotSupported' - # ... + # ... brief: > - Request error such as timeout, cancellation or one of [HTTP Request error](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs) + Request error such as timeout, cancellation or one of + [HTTP Request error](https://github.com/dotnet/runtime/blob/c430570a01c103bc7f117be573f37d8ce8a129b8/src/libraries/System.Net.Http/src/System/Net/Http/HttpRequestError.cs) examples: ['timeout', 'http_protocol_error'] note: "**TODO: there is a open discussion/proposal in otel for http error code - https://github.com/open-telemetry/semantic-conventions/pull/205**" diff --git a/model/metrics/dotnet-kestrel.yaml b/model/metrics/dotnet-kestrel.yaml index 62f097681e..84939bd859 100644 --- a/model/metrics/dotnet-kestrel.yaml +++ b/model/metrics/dotnet-kestrel.yaml @@ -88,7 +88,7 @@ groups: instrument: updowncounter unit: "{connection}" note: | - The number only tracks HTTP/1.1 connections. **TODO: can we add protocol info in dimensions so we can extend it to other versions/protocols? ** + The number only tracks HTTP/1.1 connections. **TODO: can we add protocol info in dimensions so we can extend it to other versions/protocols?** Meter name is `Microsoft.AspNetCore.Server.Kestrel` attributes: - ref: url.full diff --git a/model/metrics/dotnet-signalr.yaml b/model/metrics/dotnet-signalr.yaml index 714090a933..a0b10c92d9 100644 --- a/model/metrics/dotnet-signalr.yaml +++ b/model/metrics/dotnet-signalr.yaml @@ -56,4 +56,4 @@ groups: Corresponding `EventCounter` name is `current-connections`; Meter name is `Microsoft.AspNetCore.Http.Connections` attributes: - ref: signalr.http_transport.status - - ref: signalr.transport \ No newline at end of file + - ref: signalr.transport