Skip to content

Commit

Permalink
[chore] Mark dotnet-specific metrics and attributes stable in yaml to…
Browse files Browse the repository at this point in the history
… match markdown (#819)

Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
  • Loading branch information
lmolkova and joaopgrassi authored Mar 22, 2024
1 parent f94edec commit 25b4932
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 23 deletions.
26 changes: 13 additions & 13 deletions docs/dotnet/dotnet-aspnetcore-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ All routing metrics are reported by the `Microsoft.AspNetCore.Routing` meter.
<!-- semconv metric.aspnetcore.routing.match_attempts(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.routing.is_fallback` | boolean | A value that indicates whether the matched route is a fallback route. | `True` | Conditionally Required: if and only if a route was successfully matched. |
| `aspnetcore.routing.match_status` | string | Match result - success or failure | `success`; `failure` | Required |
| [`http.route`](../attributes-registry/http.md) | string | The matched route, that is, the path template in the format used by the respective server framework. [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: if and only if a route was successfully matched. |
| `aspnetcore.routing.is_fallback` | boolean | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>A value that indicates whether the matched route is a fallback route. | `True` | Conditionally Required: if and only if a route was successfully matched. |
| `aspnetcore.routing.match_status` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Match result - success or failure | `success`; `failure` | Required |
| [`http.route`](../attributes-registry/http.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The matched route, that is, the path template in the format used by the respective server framework. [1] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: if and only if a route was successfully matched. |

**[1]:** MUST NOT be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.
SHOULD include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.
Expand Down Expand Up @@ -75,9 +75,9 @@ Exceptions Metric is reported by the `Microsoft.AspNetCore.Diagnostics` meter.
<!-- semconv metric.aspnetcore.diagnostics.exceptions(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.diagnostics.exception.result` | string | ASP.NET Core exception middleware handling result | `handled`; `unhandled` | Required |
| `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: [1] |
| [`error.type`](../attributes-registry/error.md) | string | The full name of exception type. [2] | `System.OperationCanceledException`; `Contoso.MyException` | Required |
| `aspnetcore.diagnostics.exception.result` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>ASP.NET Core exception middleware handling result | `handled`; `unhandled` | Required |
| `aspnetcore.diagnostics.handler.type` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>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: [1] |
| [`error.type`](../attributes-registry/error.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The full name of exception type. [2] | `System.OperationCanceledException`; `Contoso.MyException` | Required |

**[1]:** if and only if the exception was handled by this handler.

Expand Down Expand Up @@ -130,7 +130,7 @@ All rate-limiting metrics are reported by the `Microsoft.AspNetCore.RateLimiting
<!-- semconv metric.aspnetcore.rate_limiting.active_request_leases(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.policy` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |

**[1]:** if the matched endpoint for the request had a rate-limiting policy.
<!-- endsemconv -->
Expand All @@ -152,7 +152,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
<!-- semconv metric.aspnetcore.rate_limiting.request_lease.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.policy` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |

**[1]:** if the matched endpoint for the request had a rate-limiting policy.
<!-- endsemconv -->
Expand All @@ -170,7 +170,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
<!-- semconv metric.aspnetcore.rate_limiting.queued_requests(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.policy` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |

**[1]:** if the matched endpoint for the request had a rate-limiting policy.
<!-- endsemconv -->
Expand All @@ -192,8 +192,8 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
<!-- semconv metric.aspnetcore.rate_limiting.request.time_in_queue(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | Required |
| `aspnetcore.rate_limiting.policy` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.result` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | Required |

**[1]:** if the matched endpoint for the request had a rate-limiting policy.

Expand Down Expand Up @@ -225,8 +225,8 @@ Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
<!-- semconv metric.aspnetcore.rate_limiting.requests(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | Required |
| `aspnetcore.rate_limiting.policy` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate limiting policy name. | `fixed`; `sliding`; `token` | Conditionally Required: [1] |
| `aspnetcore.rate_limiting.result` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | Required |

**[1]:** if the matched endpoint for the request had a rate-limiting policy.

Expand Down
12 changes: 6 additions & 6 deletions docs/dotnet/dotnet-kestrel-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`.
<!-- semconv metric.kestrel.connection.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`error.type`](../attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | Conditionally Required: if and only if an error has occurred. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [2] | `http`; `web_sockets` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [3] | `1.1`; `2` | Recommended |
| [`error.type`](../attributes-registry/error.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | Conditionally Required: if and only if an error has occurred. |
| [`network.protocol.name`](../attributes-registry/network.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [2] | `http`; `web_sockets` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Version of the protocol specified in `network.protocol.name`. [3] | `1.1`; `2` | Recommended |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [4] | `tcp`; `unix` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [5] | `ipv4`; `ipv6` | Recommended: if the transport is `tcp` or `udp` |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [6] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended |
Expand Down Expand Up @@ -252,8 +252,8 @@ different processes could be listening on TCP port 12345 and UDP port 12345.
<!-- semconv metric.kestrel.queued_requests(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`network.protocol.name`](../attributes-registry/network.md) | string | [OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [1] | `http`; `web_sockets` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | Version of the protocol specified in `network.protocol.name`. [2] | `1.1`; `2` | Recommended |
| [`network.protocol.name`](../attributes-registry/network.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>[OSI application layer](https://osi-model.com/application-layer/) or non-OSI equivalent. [1] | `http`; `web_sockets` | Recommended |
| [`network.protocol.version`](../attributes-registry/network.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>Version of the protocol specified in `network.protocol.name`. [2] | `1.1`; `2` | Recommended |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [3] | `tcp`; `unix` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [4] | `ipv4`; `ipv6` | Recommended: if the transport is `tcp` or `udp` |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [5] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended |
Expand Down Expand Up @@ -358,7 +358,7 @@ of `[ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10
<!-- semconv metric.kestrel.tls_handshake.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| [`error.type`](../attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | Conditionally Required: if and only if an error has occurred. |
| [`error.type`](../attributes-registry/error.md) | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | Conditionally Required: if and only if an error has occurred. |
| [`network.transport`](../attributes-registry/network.md) | string | [OSI transport layer](https://osi-model.com/transport-layer/) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication). [2] | `tcp`; `unix` | Recommended |
| [`network.type`](../attributes-registry/network.md) | string | [OSI network layer](https://osi-model.com/network-layer/) or non-OSI equivalent. [3] | `ipv4`; `ipv6` | Recommended: if the transport is `tcp` or `udp` |
| [`server.address`](../attributes-registry/server.md) | string | Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name. [4] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | Recommended |
Expand Down
8 changes: 4 additions & 4 deletions docs/dotnet/dotnet-signalr-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`.
<!-- semconv metric.signalr.server.connection.duration(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `signalr.connection.status` | string | SignalR HTTP connection closure status. | `app_shutdown`; `timeout` | Recommended |
| `signalr.transport` | string | [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | Recommended |
| `signalr.connection.status` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>SignalR HTTP connection closure status. | `app_shutdown`; `timeout` | Recommended |
| `signalr.transport` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | Recommended |

`signalr.connection.status` MUST be one of the following:

Expand Down Expand Up @@ -65,8 +65,8 @@ of `[ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ]`.
<!-- semconv metric.signalr.server.active_connections(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `signalr.connection.status` | string | SignalR HTTP connection closure status. | `app_shutdown`; `timeout` | Recommended |
| `signalr.transport` | string | [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | Recommended |
| `signalr.connection.status` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>SignalR HTTP connection closure status. | `app_shutdown`; `timeout` | Recommended |
| `signalr.transport` | string | ![Stable](https://img.shields.io/badge/-stable-lightgreen)<br>[SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | Recommended |

`signalr.connection.status` MUST be one of the following:

Expand Down
14 changes: 14 additions & 0 deletions model/metrics/dotnet/dotnet-aspnetcore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ groups:
- id: rate_limiting.policy
type: string
brief: Rate limiting policy name.
stability: stable
examples: ["fixed", "sliding", "token"]
requirement_level:
conditionally_required: if the matched endpoint for the request had a rate-limiting policy.
Expand All @@ -26,24 +27,28 @@ groups:
- id: request_canceled
value: 'request_canceled'
brief: "Lease request was canceled"
stability: stable
brief: Rate-limiting result, shows whether the lease was acquired or contains a rejection reason
examples: ["acquired", "request_canceled"]
requirement_level: required
- id: routing.is_fallback
type: boolean
stability: stable
brief: A value that indicates whether the matched route is a fallback route.
examples: [true]
requirement_level:
conditionally_required: If and only if a route was successfully matched.
- id: diagnostics.handler.type
type: string
stability: stable
brief: Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler)
implementation that handled the exception.
examples: ["Contoso.MyHandler"]
requirement_level:
conditionally_required: if and only if the exception was handled by this handler.
- id: request.is_unhandled
type: boolean
stability: stable
brief: Flag indicating if request was handled by the application pipeline.
examples: [true]
requirement_level:
Expand All @@ -53,6 +58,7 @@ groups:
- id: metric.aspnetcore.routing.match_attempts
type: metric
metric_name: aspnetcore.routing.match_attempts
stability: stable
brief: Number of requests that were attempted to be matched to an endpoint.
instrument: counter
unit: "{match_attempt}"
Expand All @@ -75,6 +81,7 @@ groups:
- id: failure
value: 'failure'
brief: 'Match failed'
stability: stable
requirement_level: required
brief: Match result - success or failure
examples: ["success", "failure"]
Expand All @@ -83,6 +90,7 @@ groups:
- id: metric.aspnetcore.diagnostics.exceptions
type: metric
metric_name: aspnetcore.diagnostics.exceptions
stability: stable
brief: Number of exceptions caught by exception handling middleware.
instrument: counter
unit: "{exception}"
Expand All @@ -109,6 +117,7 @@ groups:
- id: aborted
value: 'aborted'
brief: "Exception handling didn't run because the request was aborted."
stability: stable
requirement_level: required
brief: ASP.NET Core exception middleware handling result
examples: ["handled", "unhandled"]
Expand All @@ -117,6 +126,7 @@ groups:
- id: metric.aspnetcore.rate_limiting.active_request_leases
type: metric
metric_name: aspnetcore.rate_limiting.active_request_leases
stability: stable
brief: Number of requests that are currently active on the server that hold a rate limiting lease.
instrument: updowncounter
unit: "{request}"
Expand All @@ -128,6 +138,7 @@ groups:
- id: metric.aspnetcore.rate_limiting.request_lease.duration
type: metric
metric_name: aspnetcore.rate_limiting.request_lease.duration
stability: stable
brief: The duration of rate limiting lease held by requests on the server.
instrument: histogram
unit: "s"
Expand All @@ -139,6 +150,7 @@ groups:
- id: metric.aspnetcore.rate_limiting.request.time_in_queue
type: metric
metric_name: aspnetcore.rate_limiting.request.time_in_queue
stability: stable
brief: The time the request spent in a queue waiting to acquire a rate limiting lease.
instrument: histogram
unit: "s"
Expand All @@ -151,6 +163,7 @@ groups:
- id: metric.aspnetcore.rate_limiting.queued_requests
type: metric
metric_name: aspnetcore.rate_limiting.queued_requests
stability: stable
brief: Number of requests that are currently queued, waiting to acquire a rate limiting lease.
instrument: updowncounter
unit: "{request}"
Expand All @@ -162,6 +175,7 @@ groups:
- id: metric.aspnetcore.rate_limiting.requests
type: metric
metric_name: aspnetcore.rate_limiting.requests
stability: stable
brief: Number of requests that tried to acquire a rate limiting lease.
instrument: counter
unit: "{request}"
Expand Down
Loading

0 comments on commit 25b4932

Please sign in to comment.