Skip to content

Commit d1a2d48

Browse files
authored
Move .NET-specific attributes to the registry (open-telemetry#943)
1 parent 7c09a90 commit d1a2d48

12 files changed

+251
-160
lines changed

.github/CODEOWNERS

+7-3
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,15 @@
7676

7777
# .NET semantic conventions approvers
7878
/model/metrics/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
79-
/docs/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
79+
/model/registry/aspnetcore.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
80+
/model/registry/signalr.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
81+
/docs/dotnet/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
82+
/docs/attributes-registry/aspnetcore.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
83+
/docs/attributes-registry/signalr.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-dotnet-approver @open-telemetry/semconv-http-approvers
8084

8185
# Gen-AI semantic conventions approvers
82-
/model/registry/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
83-
/model/metrics/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
86+
/model/registry/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
87+
/model/metrics/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
8488
/model/trace/gen-ai.yaml @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
8589
/docs/gen-ai/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers
8690
/docs/attributes-registry/llm.md @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-llm-approvers

.github/ISSUE_TEMPLATE/bug_report.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ body:
2020
# DO NOT manually edit it.
2121
# Start semconv area list
2222
- area:android
23+
- area:aspnetcore
2324
- area:aws
2425
- area:browser
2526
- area:client
@@ -60,6 +61,7 @@ body:
6061
- area:server
6162
- area:service
6263
- area:session
64+
- area:signalr
6365
- area:source
6466
- area:system
6567
- area:telemetry

.github/ISSUE_TEMPLATE/change_proposal.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ body:
1313
# DO NOT manually edit it.
1414
# Start semconv area list
1515
- area:android
16+
- area:aspnetcore
1617
- area:aws
1718
- area:browser
1819
- area:client
@@ -53,6 +54,7 @@ body:
5354
- area:server
5455
- area:service
5556
- area:session
57+
- area:signalr
5658
- area:source
5759
- area:system
5860
- area:telemetry

.github/ISSUE_TEMPLATE/new-conventions.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ body:
2222
# DO NOT manually edit it.
2323
# Start semconv area list
2424
- area:android
25+
- area:aspnetcore
2526
- area:aws
2627
- area:browser
2728
- area:client
@@ -62,6 +63,7 @@ body:
6263
- area:server
6364
- area:service
6465
- area:session
66+
- area:signalr
6567
- area:source
6668
- area:system
6769
- area:telemetry
+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# ASP.NET Core
2+
3+
<!-- toc -->
4+
5+
- [ASP.NET Core Attributes](#aspnet-core-attributes)
6+
7+
<!-- tocstop -->
8+
9+
## ASP.NET Core Attributes
10+
11+
<!-- semconv registry.aspnetcore(omit_requirement_level) -->
12+
| Attribute | Type | Description | Examples | Stability |
13+
|---|---|---|---|---|
14+
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
15+
| `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` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
16+
| `aspnetcore.diagnostics.exception.result` | string | ASP.NET Core exception middleware handling result | `handled`; `unhandled` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
17+
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
18+
| `aspnetcore.request.is_unhandled` | boolean | Flag indicating if request was handled by the application pipeline. | `True` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
19+
| `aspnetcore.routing.is_fallback` | boolean | A value that indicates whether the matched route is a fallback route. | `True` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
20+
| `aspnetcore.routing.match_status` | string | Match result - success or failure | `success`; `failure` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
21+
22+
`aspnetcore.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.
23+
24+
| Value | Description | Stability |
25+
|---|---|---|
26+
| `acquired` | Lease was acquired | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
27+
| `endpoint_limiter` | Lease request was rejected by the endpoint limiter | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
28+
| `global_limiter` | Lease request was rejected by the global limiter | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
29+
| `request_canceled` | Lease request was canceled | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
30+
31+
`aspnetcore.diagnostics.exception.result` MUST be one of the following:
32+
33+
| Value | Description | Stability |
34+
|---|---|---|
35+
| `handled` | Exception was handled by the exception handling middleware. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
36+
| `unhandled` | Exception was not handled by the exception handling middleware. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
37+
| `skipped` | Exception handling was skipped because the response had started. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
38+
| `aborted` | Exception handling didn't run because the request was aborted. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
39+
40+
`aspnetcore.routing.match_status` 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.
41+
42+
| Value | Description | Stability |
43+
|---|---|---|
44+
| `success` | Match succeeded | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
45+
| `failure` | Match failed | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
46+
<!-- endsemconv -->

docs/attributes-registry/signalr.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ASP.NET Core
2+
3+
<!-- toc -->
4+
5+
- [SignalR Attributes](#signalr-attributes)
6+
7+
<!-- tocstop -->
8+
9+
## SignalR Attributes
10+
11+
<!-- semconv registry.signalr(omit_requirement_level) -->
12+
| Attribute | Type | Description | Examples | Stability |
13+
|---|---|---|---|---|
14+
| `signalr.connection.status` | string | SignalR HTTP connection closure status. | `app_shutdown`; `timeout` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
15+
| `signalr.transport` | string | [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) | `web_sockets`; `long_polling` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
16+
17+
`signalr.connection.status` MUST be one of the following:
18+
19+
| Value | Description | Stability |
20+
|---|---|---|
21+
| `normal_closure` | The connection was closed normally. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
22+
| `timeout` | The connection was closed due to a timeout. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
23+
| `app_shutdown` | The connection was closed because the app is shutting down. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
24+
25+
`signalr.transport` 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.
26+
27+
| Value | Description | Stability |
28+
|---|---|---|
29+
| `server_sent_events` | ServerSentEvents protocol | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
30+
| `long_polling` | LongPolling protocol | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
31+
| `web_sockets` | WebSockets protocol | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
32+
<!-- endsemconv -->

docs/dotnet/dotnet-aspnetcore-metrics.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ All routing metrics are reported by the `Microsoft.AspNetCore.Routing` meter.
4343
<!-- semconv metric.aspnetcore.routing.match_attempts(full) -->
4444
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
4545
|---|---|---|---|---|---|
46-
| `aspnetcore.routing.match_status` | string | Match result - success or failure | `success`; `failure` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
47-
| `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. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
46+
| [`aspnetcore.routing.match_status`](../attributes-registry/aspnetcore.md) | string | Match result - success or failure | `success`; `failure` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
47+
| [`aspnetcore.routing.is_fallback`](../attributes-registry/aspnetcore.md) | 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. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
4848
| [`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. | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
4949

5050
**[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.
@@ -75,9 +75,9 @@ Exceptions Metric is reported by the `Microsoft.AspNetCore.Diagnostics` meter.
7575
<!-- semconv metric.aspnetcore.diagnostics.exceptions(full) -->
7676
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
7777
|---|---|---|---|---|---|
78-
| `aspnetcore.diagnostics.exception.result` | string | ASP.NET Core exception middleware handling result | `handled`; `unhandled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
78+
| [`aspnetcore.diagnostics.exception.result`](../attributes-registry/aspnetcore.md) | string | ASP.NET Core exception middleware handling result | `handled`; `unhandled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
7979
| [`error.type`](../attributes-registry/error.md) | string | The full name of exception type. [1] | `System.OperationCanceledException`; `Contoso.MyException` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
80-
| `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` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
80+
| [`aspnetcore.diagnostics.handler.type`](../attributes-registry/aspnetcore.md) | 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` [2] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
8181

8282
**[1]:** The `error.type` SHOULD be predictable, and SHOULD have low cardinality.
8383

@@ -134,7 +134,7 @@ All rate-limiting metrics are reported by the `Microsoft.AspNetCore.RateLimiting
134134
<!-- semconv metric.aspnetcore.rate_limiting.active_request_leases(full) -->
135135
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
136136
|---|---|---|---|---|---|
137-
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
137+
| [`aspnetcore.rate_limiting.policy`](../attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
138138

139139
**[1]:** if the matched endpoint for the request had a rate-limiting policy.
140140
<!-- endsemconv -->
@@ -156,7 +156,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
156156
<!-- semconv metric.aspnetcore.rate_limiting.request_lease.duration(full) -->
157157
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
158158
|---|---|---|---|---|---|
159-
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
159+
| [`aspnetcore.rate_limiting.policy`](../attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
160160

161161
**[1]:** if the matched endpoint for the request had a rate-limiting policy.
162162
<!-- endsemconv -->
@@ -174,7 +174,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
174174
<!-- semconv metric.aspnetcore.rate_limiting.queued_requests(full) -->
175175
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
176176
|---|---|---|---|---|---|
177-
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
177+
| [`aspnetcore.rate_limiting.policy`](../attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
178178

179179
**[1]:** if the matched endpoint for the request had a rate-limiting policy.
180180
<!-- endsemconv -->
@@ -196,8 +196,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
196196
<!-- semconv metric.aspnetcore.rate_limiting.request.time_in_queue(full) -->
197197
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
198198
|---|---|---|---|---|---|
199-
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
200-
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
199+
| [`aspnetcore.rate_limiting.result`](../attributes-registry/aspnetcore.md) | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
200+
| [`aspnetcore.rate_limiting.policy`](../attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
201201

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

@@ -229,8 +229,8 @@ Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
229229
<!-- semconv metric.aspnetcore.rate_limiting.requests(full) -->
230230
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
231231
|---|---|---|---|---|---|
232-
| `aspnetcore.rate_limiting.result` | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
233-
| `aspnetcore.rate_limiting.policy` | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
232+
| [`aspnetcore.rate_limiting.result`](../attributes-registry/aspnetcore.md) | string | Rate-limiting result, shows whether the lease was acquired or contains a rejection reason | `acquired`; `request_canceled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
233+
| [`aspnetcore.rate_limiting.policy`](../attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
234234

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

0 commit comments

Comments
 (0)