Status: Development
This document describes semantic conventions for CPython Runtime metrics in OpenTelemetry.
Status: development
Description: CPython metrics related to garbage collection, captured under the namespace cpython.gc.*.
This metric is recommended.
| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
|---|---|---|---|---|---|
cpython.gc.collections |
Counter | {collection} |
The number of times a generation was collected since interpreter start. [1] |
[1]: This metric reports data from gc.stats().
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
cpython.gc.generation |
Required |
int | Value of the garbage collector collection generation. | 0; 1; 2 |
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.
| Value | Description | Stability |
|---|---|---|
0 |
Generation 0 | |
1 |
Generation 1 | |
2 |
Generation 2 |
This metric is recommended.
[1]: This metric reports data from gc.stats().
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
cpython.gc.generation |
Required |
int | Value of the garbage collector collection generation. | 0; 1; 2 |
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.
| Value | Description | Stability |
|---|---|---|
0 |
Generation 0 | |
1 |
Generation 1 | |
2 |
Generation 2 |
This metric is recommended.
[1]: This metric reports data from gc.stats().
Attributes:
| Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|
cpython.gc.generation |
Required |
int | Value of the garbage collector collection generation. | 0; 1; 2 |
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.
| Value | Description | Stability |
|---|---|---|
0 |
Generation 0 | |
1 |
Generation 1 | |
2 |
Generation 2 |