Skip to content

Commit ab0e4b4

Browse files
Proposal: Unify metric templates (#1411)
Co-authored-by: Joao Grassi <5938087+joaopgrassi@users.noreply.github.com>
1 parent 0005a84 commit ab0e4b4

21 files changed

+182
-2392
lines changed

docs/database/database-metrics.md

Lines changed: 10 additions & 140 deletions
Large diffs are not rendered by default.

docs/dns/dns-metrics.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This metric SHOULD be specified with
2727
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.35.0/specification/metrics/api.md#instrument-advisory-parameters)
2828
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 ]`.
2929

30-
<!-- semconv metric.dns.lookup.duration(metric_table) -->
30+
<!-- semconv metric.dns.lookup.duration -->
3131
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
3232
<!-- see templates/registry/markdown/snippet.md.j2 -->
3333
<!-- prettier-ignore-start -->
@@ -38,19 +38,6 @@ 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
3838
| -------- | --------------- | ----------- | -------------- | --------- |
3939
| `dns.lookup.duration` | Histogram | `s` | Measures the time taken to perform a DNS lookup. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
4040

41-
42-
<!-- markdownlint-restore -->
43-
<!-- prettier-ignore-end -->
44-
<!-- END AUTOGENERATED TEXT -->
45-
<!-- endsemconv -->
46-
47-
<!-- semconv metric.dns.lookup.duration -->
48-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
49-
<!-- see templates/registry/markdown/snippet.md.j2 -->
50-
<!-- prettier-ignore-start -->
51-
<!-- markdownlint-capture -->
52-
<!-- markdownlint-disable -->
53-
5441
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
5542
|---|---|---|---|---|---|
5643
| [`dns.question.name`](/docs/attributes-registry/dns.md) | string | The name being queried. [1] | `www.example.com`; `dot.net` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

docs/dotnet/dotnet-aspnetcore-metrics.md

Lines changed: 7 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ All routing metrics are reported by the `Microsoft.AspNetCore.Routing` meter.
3232

3333
### Metric: `aspnetcore.routing.match_attempts`
3434

35-
<!-- semconv metric.aspnetcore.routing.match_attempts(metric_table) -->
35+
<!-- semconv metric.aspnetcore.routing.match_attempts -->
3636
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
3737
<!-- see templates/registry/markdown/snippet.md.j2 -->
3838
<!-- prettier-ignore-start -->
@@ -47,19 +47,6 @@ All routing metrics are reported by the `Microsoft.AspNetCore.Routing` meter.
4747
**[1]:** Meter name: `Microsoft.AspNetCore.Routing`; Added in: ASP.NET Core 8.0
4848

4949

50-
51-
<!-- markdownlint-restore -->
52-
<!-- prettier-ignore-end -->
53-
<!-- END AUTOGENERATED TEXT -->
54-
<!-- endsemconv -->
55-
56-
<!-- semconv metric.aspnetcore.routing.match_attempts -->
57-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
58-
<!-- see templates/registry/markdown/snippet.md.j2 -->
59-
<!-- prettier-ignore-start -->
60-
<!-- markdownlint-capture -->
61-
<!-- markdownlint-disable -->
62-
6350
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
6451
|---|---|---|---|---|---|
6552
| [`aspnetcore.routing.match_status`](/docs/attributes-registry/aspnetcore.md) | string | Match result - success or failure | `success`; `failure` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -91,7 +78,7 @@ Exceptions Metric is reported by the `Microsoft.AspNetCore.Diagnostics` meter.
9178

9279
### Metric: `aspnetcore.diagnostics.exceptions`
9380

94-
<!-- semconv metric.aspnetcore.diagnostics.exceptions(metric_table) -->
81+
<!-- semconv metric.aspnetcore.diagnostics.exceptions -->
9582
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
9683
<!-- see templates/registry/markdown/snippet.md.j2 -->
9784
<!-- prettier-ignore-start -->
@@ -106,19 +93,6 @@ Exceptions Metric is reported by the `Microsoft.AspNetCore.Diagnostics` meter.
10693
**[1]:** Meter name: `Microsoft.AspNetCore.Diagnostics`; Added in: ASP.NET Core 8.0
10794

10895

109-
110-
<!-- markdownlint-restore -->
111-
<!-- prettier-ignore-end -->
112-
<!-- END AUTOGENERATED TEXT -->
113-
<!-- endsemconv -->
114-
115-
<!-- semconv metric.aspnetcore.diagnostics.exceptions -->
116-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
117-
<!-- see templates/registry/markdown/snippet.md.j2 -->
118-
<!-- prettier-ignore-start -->
119-
<!-- markdownlint-capture -->
120-
<!-- markdownlint-disable -->
121-
12296
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
12397
|---|---|---|---|---|---|
12498
| [`aspnetcore.diagnostics.exception.result`](/docs/attributes-registry/aspnetcore.md) | string | ASP.NET Core exception middleware handling result | `handled`; `unhandled` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -178,7 +152,7 @@ All rate-limiting metrics are reported by the `Microsoft.AspNetCore.RateLimiting
178152

179153
### Metric: `aspnetcore.rate_limiting.active_request_leases`
180154

181-
<!-- semconv metric.aspnetcore.rate_limiting.active_request_leases(metric_table) -->
155+
<!-- semconv metric.aspnetcore.rate_limiting.active_request_leases -->
182156
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
183157
<!-- see templates/registry/markdown/snippet.md.j2 -->
184158
<!-- prettier-ignore-start -->
@@ -193,19 +167,6 @@ All rate-limiting metrics are reported by the `Microsoft.AspNetCore.RateLimiting
193167
**[1]:** Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
194168

195169

196-
197-
<!-- markdownlint-restore -->
198-
<!-- prettier-ignore-end -->
199-
<!-- END AUTOGENERATED TEXT -->
200-
<!-- endsemconv -->
201-
202-
<!-- semconv metric.aspnetcore.rate_limiting.active_request_leases -->
203-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
204-
<!-- see templates/registry/markdown/snippet.md.j2 -->
205-
<!-- prettier-ignore-start -->
206-
<!-- markdownlint-capture -->
207-
<!-- markdownlint-disable -->
208-
209170
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
210171
|---|---|---|---|---|---|
211172
| [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -226,7 +187,7 @@ this metric SHOULD be specified with
226187
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.35.0/specification/metrics/api.md#instrument-advisory-parameters)
227188
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 ]`.
228189

229-
<!-- semconv metric.aspnetcore.rate_limiting.request_lease.duration(metric_table) -->
190+
<!-- semconv metric.aspnetcore.rate_limiting.request_lease.duration -->
230191
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
231192
<!-- see templates/registry/markdown/snippet.md.j2 -->
232193
<!-- prettier-ignore-start -->
@@ -241,19 +202,6 @@ 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
241202
**[1]:** Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
242203

243204

244-
245-
<!-- markdownlint-restore -->
246-
<!-- prettier-ignore-end -->
247-
<!-- END AUTOGENERATED TEXT -->
248-
<!-- endsemconv -->
249-
250-
<!-- semconv metric.aspnetcore.rate_limiting.request_lease.duration
251-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
252-
<!-- see templates/registry/markdown/snippet.md.j2 -->
253-
<!-- prettier-ignore-start -->
254-
<!-- markdownlint-capture -->
255-
<!-- markdownlint-disable -->
256-
257205
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
258206
|---|---|---|---|---|---|
259207
| [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -270,7 +218,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
270218

271219
### Metric: `aspnetcore.rate_limiting.queued_requests`
272220

273-
<!-- semconv metric.aspnetcore.rate_limiting.queued_requests(metric_table) -->
221+
<!-- semconv metric.aspnetcore.rate_limiting.queued_requests -->
274222
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
275223
<!-- see templates/registry/markdown/snippet.md.j2 -->
276224
<!-- prettier-ignore-start -->
@@ -285,19 +233,6 @@ 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
285233
**[1]:** Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
286234

287235

288-
289-
<!-- markdownlint-restore -->
290-
<!-- prettier-ignore-end -->
291-
<!-- END AUTOGENERATED TEXT -->
292-
<!-- endsemconv -->
293-
294-
<!-- semconv metric.aspnetcore.rate_limiting.queued_requests -->
295-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
296-
<!-- see templates/registry/markdown/snippet.md.j2 -->
297-
<!-- prettier-ignore-start -->
298-
<!-- markdownlint-capture -->
299-
<!-- markdownlint-disable -->
300-
301236
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
302237
|---|---|---|---|---|---|
303238
| [`aspnetcore.rate_limiting.policy`](/docs/attributes-registry/aspnetcore.md) | string | Rate limiting policy name. | `fixed`; `sliding`; `token` | `Conditionally Required` [1] | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
@@ -318,7 +253,7 @@ this metric SHOULD be specified with
318253
[`ExplicitBucketBoundaries`](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.35.0/specification/metrics/api.md#instrument-advisory-parameters)
319254
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 ]`.
320255

321-
<!-- semconv metric.aspnetcore.rate_limiting.request.time_in_queue(metric_table) -->
256+
<!-- semconv metric.aspnetcore.rate_limiting.request.time_in_queue -->
322257
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
323258
<!-- see templates/registry/markdown/snippet.md.j2 -->
324259
<!-- prettier-ignore-start -->
@@ -333,19 +268,6 @@ 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
333268
**[1]:** Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
334269

335270

336-
337-
<!-- markdownlint-restore -->
338-
<!-- prettier-ignore-end -->
339-
<!-- END AUTOGENERATED TEXT -->
340-
<!-- endsemconv -->
341-
342-
<!-- semconv metric.aspnetcore.rate_limiting.request.time_in_queue -->
343-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
344-
<!-- see templates/registry/markdown/snippet.md.j2 -->
345-
<!-- prettier-ignore-start -->
346-
<!-- markdownlint-capture -->
347-
<!-- markdownlint-disable -->
348-
349271
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
350272
|---|---|---|---|---|---|
351273
| [`aspnetcore.rate_limiting.result`](/docs/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) |
@@ -373,7 +295,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
373295

374296
### Metric: `aspnetcore.rate_limiting.requests`
375297

376-
<!-- semconv metric.aspnetcore.rate_limiting.requests(metric_table) -->
298+
<!-- semconv metric.aspnetcore.rate_limiting.requests -->
377299
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
378300
<!-- see templates/registry/markdown/snippet.md.j2 -->
379301
<!-- prettier-ignore-start -->
@@ -393,19 +315,6 @@ 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
393315
Meter name: `Microsoft.AspNetCore.RateLimiting`; Added in: ASP.NET Core 8.0
394316

395317

396-
397-
<!-- markdownlint-restore -->
398-
<!-- prettier-ignore-end -->
399-
<!-- END AUTOGENERATED TEXT -->
400-
<!-- endsemconv -->
401-
402-
<!-- semconv metric.aspnetcore.rate_limiting.requests -->
403-
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
404-
<!-- see templates/registry/markdown/snippet.md.j2 -->
405-
<!-- prettier-ignore-start -->
406-
<!-- markdownlint-capture -->
407-
<!-- markdownlint-disable -->
408-
409318
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
410319
|---|---|---|---|---|---|
411320
| [`aspnetcore.rate_limiting.result`](/docs/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) |

0 commit comments

Comments
 (0)