Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Jul 27, 2023
1 parent ad9bbc7 commit f85bfa8
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 19 deletions.
22 changes: 17 additions & 5 deletions docs/dotnet/dotnet-aspnet-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- tocstop -->

Expand Down Expand Up @@ -133,6 +133,9 @@ All rate-limiting metrics are reported by `Microsoft.AspNetCore.RateLimiting` me
<!-- endsemconv -->

<!-- semconv metric.aspnet.rate_limiting.request_lease.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnet.rate_limiting.policy` | string | TODO | `TODO` | Required |
<!-- endsemconv -->

### Metric: `aspnet.rate_limiting.queued_requests`
Expand Down Expand Up @@ -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?**
<!-- endsemconv -->

<!-- semconv metric.aspnet.rate_limiting.queued_request.duration(full) -->
| 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 |
<!-- endsemconv -->

### Metric: `aspnet.rate_limiting.requests`
Expand All @@ -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.

Expand All @@ -197,5 +210,4 @@ Meter name is `Microsoft.AspNetCore.RateLimiting`
| `request_canceled` | Lease request was canceled |
<!-- endsemconv -->


[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
1 change: 0 additions & 1 deletion docs/dotnet/dotnet-dns-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ Tabs, carriage returns, and line feeds should be converted to \t, \r, and
\n respectively.
<!-- endsemconv -->


[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
6 changes: 2 additions & 4 deletions docs/dotnet/dotnet-http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
<!-- endsemconv -->


### Metric: `http.client.active_requests`

<!-- semconv metric.dotnet.http.client.active_requests(metric_table) -->
Expand Down Expand Up @@ -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`

Expand Down Expand Up @@ -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. |
<!-- endsemconv -->


### Metric: `http.server.active_requests`

**TODO: Opt-in address and port?**
Expand Down Expand Up @@ -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. |
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
4 changes: 2 additions & 2 deletions docs/dotnet/dotnet-kestrel-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
<!-- endsemconv -->

Expand Down Expand Up @@ -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.
<!-- endsemconv -->

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
3 changes: 1 addition & 2 deletions docs/dotnet/dotnet-signalr-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,4 @@ This document defines semantic conventions for SignalR metrics emitted by .NET c
| `web_sockets` | WebSockets protocol |
<!-- endsemconv -->


[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
2 changes: 1 addition & 1 deletion model/metrics/dotnet-aspnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions model/metrics/dotnet-http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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**"

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 @@ -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
Expand Down
2 changes: 1 addition & 1 deletion model/metrics/dotnet-signalr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
- ref: signalr.transport

0 comments on commit f85bfa8

Please sign in to comment.