Skip to content

Commit 589e469

Browse files
committed
Rename metrics and use int as values
1 parent 6ad9c9d commit 589e469

File tree

4 files changed

+36
-36
lines changed

4 files changed

+36
-36
lines changed

docs/attributes-registry/cpython.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ This document defines CPython related attributes.
99

1010
| Attribute | Type | Description | Examples | Stability |
1111
|---|---|---|---|---|
12-
| <a id="cpython-gc-generation" href="#cpython-gc-generation">`cpython.gc.generation`</a> | string | Name of the garbage collector collection generation. | `gen0`; `gen1`; `gen2` | ![Development](https://img.shields.io/badge/-development-blue) |
12+
| <a id="cpython-gc-generation" href="#cpython-gc-generation">`cpython.gc.generation`</a> | int | Value of the garbage collector collection generation. | `0`; `1`; `2` | ![Development](https://img.shields.io/badge/-development-blue) |
1313

1414
---
1515

1616
`cpython.gc.generation` 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.
1717

1818
| Value | Description | Stability |
1919
|---|---|---|
20-
| `gen0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
21-
| `gen1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
22-
| `gen2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
20+
| `0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
21+
| `1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
22+
| `2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |

docs/runtime/cpython-metrics.md

+20-20
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This document describes semantic conventions for CPython Runtime metrics in Open
1212

1313
- [CPython Garbage Collection](#cpython-garbage-collection)
1414
- [Metric: `cpython.gc.collections`](#metric-cpythongccollections)
15-
- [Metric: `cpython.gc.collected.objects`](#metric-cpythongccollectedobjects)
16-
- [Metric: `cpython.gc.uncollectable.objects`](#metric-cpythongcuncollectableobjects)
15+
- [Metric: `cpython.gc.collected_objects`](#metric-cpythongccollectedobjects)
16+
- [Metric: `cpython.gc.uncollectable_objects`](#metric-cpythongcuncollectableobjects)
1717

1818
<!-- tocstop -->
1919

@@ -42,28 +42,28 @@ This metric is [recommended][MetricRecommended].
4242

4343
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
4444
|---|---|---|---|---|---|
45-
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | string | Name of the garbage collector collection generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
45+
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | int | Value of the garbage collector collection generation. | `0`; `1`; `2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
4646

4747
---
4848

4949
`cpython.gc.generation` 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.
5050

5151
| Value | Description | Stability |
5252
|---|---|---|
53-
| `gen0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
54-
| `gen1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
55-
| `gen2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
53+
| `0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
54+
| `1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
55+
| `2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
5656

5757
<!-- markdownlint-restore -->
5858
<!-- prettier-ignore-end -->
5959
<!-- END AUTOGENERATED TEXT -->
6060
<!-- endsemconv -->
6161

62-
### Metric: `cpython.gc.collected.objects`
62+
### Metric: `cpython.gc.collected_objects`
6363

6464
This metric is [recommended][MetricRecommended].
6565

66-
<!-- semconv metric.cpython.gc.collected.objects -->
66+
<!-- semconv metric.cpython.gc.collected_objects -->
6767
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
6868
<!-- see templates/registry/markdown/snippet.md.j2 -->
6969
<!-- prettier-ignore-start -->
@@ -72,34 +72,34 @@ This metric is [recommended][MetricRecommended].
7272

7373
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
7474
| -------- | --------------- | ----------- | -------------- | --------- |
75-
| `cpython.gc.collected.objects` | Counter | `{object}` | The total number of objects collected inside a generation that have occurred since interpreter start. [1] | ![Development](https://img.shields.io/badge/-development-blue) |
75+
| `cpython.gc.collected_objects` | Counter | `{object}` | The total number of objects collected inside a generation that have occurred since interpreter start. [1] | ![Development](https://img.shields.io/badge/-development-blue) |
7676

7777
**[1]:** This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats)
7878

7979
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
8080
|---|---|---|---|---|---|
81-
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | string | Name of the garbage collector collection generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
81+
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | int | Value of the garbage collector collection generation. | `0`; `1`; `2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
8282

8383
---
8484

8585
`cpython.gc.generation` 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.
8686

8787
| Value | Description | Stability |
8888
|---|---|---|
89-
| `gen0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
90-
| `gen1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
91-
| `gen2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
89+
| `0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
90+
| `1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
91+
| `2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
9292

9393
<!-- markdownlint-restore -->
9494
<!-- prettier-ignore-end -->
9595
<!-- END AUTOGENERATED TEXT -->
9696
<!-- endsemconv -->
9797

98-
### Metric: `cpython.gc.uncollectable.objects`
98+
### Metric: `cpython.gc.uncollectable_objects`
9999

100100
This metric is [recommended][MetricRecommended].
101101

102-
<!-- semconv metric.cpython.gc.uncollectable.objects -->
102+
<!-- semconv metric.cpython.gc.uncollectable_objects -->
103103
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
104104
<!-- see templates/registry/markdown/snippet.md.j2 -->
105105
<!-- prettier-ignore-start -->
@@ -108,23 +108,23 @@ This metric is [recommended][MetricRecommended].
108108

109109
| Name | Instrument Type | Unit (UCUM) | Description | Stability |
110110
| -------- | --------------- | ----------- | -------------- | --------- |
111-
| `cpython.gc.uncollectable.objects` | Counter | `{object}` | The total number of uncollectable objects inside a generation that have occurred since interpreter start. [1] | ![Development](https://img.shields.io/badge/-development-blue) |
111+
| `cpython.gc.uncollectable_objects` | Counter | `{object}` | The total number of uncollectable objects inside a generation that have occurred since interpreter start. [1] | ![Development](https://img.shields.io/badge/-development-blue) |
112112

113113
**[1]:** This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats)
114114

115115
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
116116
|---|---|---|---|---|---|
117-
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | string | Name of the garbage collector collection generation. | `gen0`; `gen1`; `gen2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
117+
| [`cpython.gc.generation`](/docs/attributes-registry/cpython.md) | int | Value of the garbage collector collection generation. | `0`; `1`; `2` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
118118

119119
---
120120

121121
`cpython.gc.generation` 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.
122122

123123
| Value | Description | Stability |
124124
|---|---|---|
125-
| `gen0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
126-
| `gen1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
127-
| `gen2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
125+
| `0` | Generation 0 | ![Development](https://img.shields.io/badge/-development-blue) |
126+
| `1` | Generation 1 | ![Development](https://img.shields.io/badge/-development-blue) |
127+
| `2` | Generation 2 | ![Development](https://img.shields.io/badge/-development-blue) |
128128

129129
<!-- markdownlint-restore -->
130130
<!-- prettier-ignore-end -->

model/cpython/metrics.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ groups:
1212
- ref: cpython.gc.generation
1313
requirement_level: required
1414

15-
- id: metric.cpython.gc.collected.objects
15+
- id: metric.cpython.gc.collected_objects
1616
type: metric
17-
metric_name: cpython.gc.collected.objects
17+
metric_name: cpython.gc.collected_objects
1818
brief: "The total number of objects collected inside a generation that have occurred since interpreter start."
1919
note: >
2020
This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats)
@@ -25,9 +25,9 @@ groups:
2525
- ref: cpython.gc.generation
2626
requirement_level: required
2727

28-
- id: metric.cpython.gc.uncollectable.objects
28+
- id: metric.cpython.gc.uncollectable_objects
2929
type: metric
30-
metric_name: cpython.gc.uncollectable.objects
30+
metric_name: cpython.gc.uncollectable_objects
3131
brief: "The total number of uncollectable objects inside a generation that have occurred since interpreter start."
3232
note: >
3333
This metric reports data from [`gc.stats()`](https://docs.python.org/3/library/gc.html#gc.get_stats)

model/cpython/registry.yaml

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ groups:
99
stability: development
1010
type:
1111
members:
12-
- id: gen0
13-
value: 'gen0'
12+
- id: '0'
13+
value: 0
1414
brief: "Generation 0"
1515
stability: development
16-
- id: gen1
17-
value: 'gen1'
16+
- id: '1'
17+
value: 1
1818
brief: "Generation 1"
1919
stability: development
20-
- id: gen2
21-
value: 'gen2'
20+
- id: '2'
21+
value: 2
2222
brief: "Generation 2"
2323
stability: development
24-
brief: Name of the garbage collector collection generation.
25-
examples: ["gen0", "gen1", "gen2"]
24+
brief: Value of the garbage collector collection generation.
25+
examples: [0, 1, 2]

0 commit comments

Comments
 (0)