Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed Aug 7, 2023
1 parent 656a9f2 commit 3910f8a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This document documents semantic conventions for metrics emitted by .NET runtime

Following metrics are currently supported:

* [ASP.NET Core](dotnet-aspnet-metrics.md): Semantic Conventions for ASP.NET Core routing, exceptions, and rate-limiting *metrics*.
* [ASP.NET Core](dotnet-aspnetcore-metrics.md): Semantic Conventions for ASP.NET Core routing, exceptions, and rate-limiting *metrics*.
* [DNS](dotnet-dns-metrics.md): Semantic Conventions for client-side DNS lookups associated with *metrics*.
* [HTTP](dotnet-http-metrics.md): Semantic Conventions for HTTP client and server *metrics*.
* [Kestrel](dotnet-kestrel-metrics.md): Semantic Conventions for Kestrel web server *metrics*.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Semantic Conventions for ASP.NET Core specific metrics
# Semantic Conventions for ASP.NET Core metrics

**Status**: [Experimental][DocumentStatus]

Expand Down
25 changes: 7 additions & 18 deletions docs/dotnet/dotnet-http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,18 +313,14 @@ All Http server metrics are reported by `Microsoft.AspNetCore.Hosting` meter.
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `aspnetcore.request.is_unhandled` | boolean | Flag indicating if request was handled by the application pipeline. | `True` | Conditionally Required: if and only if the request was not handled. |
| `http.error.reason` | string | Request failure reason. [1] | `cancellation`; `Contoso.MyException`; `System.IO.IOException` | Conditionally Required: [2] |
| `http.request.method` | string | HTTP request method. [3] | `GET`; `POST`; `HEAD` | Required |
| `exception.type` | string | The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it. | `java.net.ConnectException`; `OSError` | Recommended |
| `http.request.method` | string | HTTP request method. [1] | `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. |
| `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [4] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
| [`network.protocol.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [5] | `1.1`; `2` | Recommended |
| `http.route` | string | The matched route (path template in the format used by the respective server framework). See note below [2] | `/users/:userID?`; `{controller}/{action}/{id?}` | Conditionally Required: If and only if it's available |
| [`network.protocol.version`](../general/attributes.md) | string | Version of the application layer protocol used. See note below. [3] | `1.1`; `2` | Recommended |
| [`url.scheme`](../url/url.md) | string | The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol. | `http`; `https`; `ftp` | Recommended |

**[1]:** HTTP instrumentations that decide to report additional error codes SHOULD document them. Additional values MUST be a closed set of error reasons known at the development time of the instrumentation.

**[2]:** if and only if the request failed before response was sent.

**[3]:** HTTP request method value SHOULD be "known" to the instrumentation.
**[1]:** HTTP request method value SHOULD be "known" to the instrumentation.
By default, this convention defines "known" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)
and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).

Expand All @@ -340,17 +336,10 @@ HTTP method names are case-sensitive and `http.request.method` attribute value M
Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, SHOULD populate a canonical equivalent.
Tracing instrumentations that do so, MUST also set `http.request.method_original` to the original value.

**[4]:** 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.
**[2]:** 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.

**[5]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.

`http.error.reason` 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 |
|---|---|
| `` | No error. Default value. |
| `_OTHER` | unknown error |
**[3]:** `network.protocol.version` refers to the version of the protocol used and might be different from the protocol client's version. If the HTTP client used has a version of `0.27.2`, but sends HTTP version `1.1`, this attribute should be set to `1.1`.

`http.request.method` 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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ groups:
- ref: http.response.status_code
- ref: http.route
- ref: http.request.method
- ref: http.error.reason
examples: ['cancellation', 'Contoso.MyException', 'System.IO.IOException']
requirement_level:
conditionally_required: if and only if the request failed before response was sent.
- ref: exception.type
- ref: aspnetcore.request.is_unhandled

- id: metric.dotnet.http.server.active_requests
Expand Down

0 comments on commit 3910f8a

Please sign in to comment.