Skip to content

Commit 30367f0

Browse files
ChrsMarkcodeboten
andauthored
[chore][kafkaexporter] Add stability level per metric (open-telemetry#42994)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description open-telemetry/opentelemetry-collector#13756 added support for exposing metrics' stability level in the generated documentation. This PR makes use of this functionality. We start by setting the stability of all metrics to `development`. More info about levels can be found at https://github.com/open-telemetry/opentelemetry-specification/blob/v1.49.0/oteps/0232-maturity-of-otel.md#maturity-levels. Related to: - open-telemetry/opentelemetry-collector#11878 - open-telemetry/opentelemetry-collector#13297 - open-telemetry#35325 - open-telemetry#42809 <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes ~ <!--Describe what testing was performed and which tests were added.--> #### Testing ~ <!--Describe the documentation added.--> #### Documentation Updated <!--Please delete paragraphs that you did not use before submitting.--> Signed-off-by: ChrsMark <[email protected]> Co-authored-by: Alex Boten <[email protected]>
1 parent 38f9da6 commit 30367f0

File tree

4 files changed

+56
-42
lines changed

4 files changed

+56
-42
lines changed

exporter/kafkaexporter/documentation.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ The following telemetry is emitted by this component.
88

99
### otelcol_kafka_broker_closed
1010

11-
The total number of connections closed.
11+
The total number of connections closed. [development]
1212

1313
Only produced when franz-go is enabled.
1414

15-
| Unit | Metric Type | Value Type | Monotonic |
16-
| ---- | ----------- | ---------- | --------- |
17-
| 1 | Sum | Int | true |
15+
| Unit | Metric Type | Value Type | Monotonic | Stability |
16+
| ---- | ----------- | ---------- | --------- | --------- |
17+
| 1 | Sum | Int | true | development |
1818

1919
#### Attributes
2020

@@ -24,13 +24,13 @@ Only produced when franz-go is enabled.
2424

2525
### otelcol_kafka_broker_connects
2626

27-
The total number of connections opened.
27+
The total number of connections opened. [development]
2828

2929
Only produced when franz-go is enabled.
3030

31-
| Unit | Metric Type | Value Type | Monotonic |
32-
| ---- | ----------- | ---------- | --------- |
33-
| 1 | Sum | Int | true |
31+
| Unit | Metric Type | Value Type | Monotonic | Stability |
32+
| ---- | ----------- | ---------- | --------- | --------- |
33+
| 1 | Sum | Int | true | development |
3434

3535
#### Attributes
3636

@@ -57,13 +57,13 @@ Only produced when franz-go is enabled. Deprecated in favor of kafka_broker_thro
5757

5858
### otelcol_kafka_broker_throttling_latency
5959

60-
The throttling latency in seconds imposed by the broker when exporting records.
60+
The throttling latency in seconds imposed by the broker when exporting records. [development]
6161

6262
Only produced when franz-go is enabled.
6363

64-
| Unit | Metric Type | Value Type |
65-
| ---- | ----------- | ---------- |
66-
| s | Histogram | Double |
64+
| Unit | Metric Type | Value Type | Stability |
65+
| ---- | ----------- | ---------- | --------- |
66+
| s | Histogram | Double | development |
6767

6868
#### Attributes
6969

@@ -73,13 +73,13 @@ Only produced when franz-go is enabled.
7373

7474
### otelcol_kafka_exporter_bytes
7575

76-
The size in bytes of exported records seen by the broker.
76+
The size in bytes of exported records seen by the broker. [development]
7777

7878
Only produced when franz-go is enabled.
7979

80-
| Unit | Metric Type | Value Type | Monotonic |
81-
| ---- | ----------- | ---------- | --------- |
82-
| By | Sum | Int | true |
80+
| Unit | Metric Type | Value Type | Monotonic | Stability |
81+
| ---- | ----------- | ---------- | --------- | --------- |
82+
| By | Sum | Int | true | development |
8383

8484
#### Attributes
8585

@@ -92,11 +92,11 @@ Only produced when franz-go is enabled.
9292

9393
### otelcol_kafka_exporter_bytes_uncompressed
9494

95-
The uncompressed size in bytes of exported messages seen by the client.
95+
The uncompressed size in bytes of exported messages seen by the client. [development]
9696

97-
| Unit | Metric Type | Value Type | Monotonic |
98-
| ---- | ----------- | ---------- | --------- |
99-
| By | Sum | Int | true |
97+
| Unit | Metric Type | Value Type | Monotonic | Stability |
98+
| ---- | ----------- | ---------- | --------- | --------- |
99+
| By | Sum | Int | true | development |
100100

101101
#### Attributes
102102

@@ -147,11 +147,11 @@ Deprecated in favor of kafka_exporter_records.
147147

148148
### otelcol_kafka_exporter_records
149149

150-
The number of exported records.
150+
The number of exported records. [development]
151151

152-
| Unit | Metric Type | Value Type | Monotonic |
153-
| ---- | ----------- | ---------- | --------- |
154-
| 1 | Sum | Int | true |
152+
| Unit | Metric Type | Value Type | Monotonic | Stability |
153+
| ---- | ----------- | ---------- | --------- | --------- |
154+
| 1 | Sum | Int | true | development |
155155

156156
#### Attributes
157157

@@ -164,11 +164,11 @@ The number of exported records.
164164

165165
### otelcol_kafka_exporter_write_latency
166166

167-
The time it took in seconds to export a batch of records.
167+
The time it took in seconds to export a batch of records. [development]
168168

169-
| Unit | Metric Type | Value Type |
170-
| ---- | ----------- | ---------- |
171-
| s | Histogram | Double |
169+
| Unit | Metric Type | Value Type | Stability |
170+
| ---- | ----------- | ---------- | --------- |
171+
| s | Histogram | Double | development |
172172

173173
#### Attributes
174174

exporter/kafkaexporter/internal/metadata/generated_telemetry.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/kafkaexporter/internal/metadatatest/generated_telemetrytest.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

exporter/kafkaexporter/metadata.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ telemetry:
3939
metrics:
4040
kafka_broker_connects:
4141
enabled: true
42+
stability:
43+
level: development
4244
description: The total number of connections opened.
4345
extended_documentation: Only produced when franz-go is enabled.
4446
optional: true
@@ -49,6 +51,8 @@ telemetry:
4951
attributes: [node_id, outcome]
5052
kafka_broker_closed:
5153
enabled: true
54+
stability:
55+
level: development
5256
description: The total number of connections closed.
5357
extended_documentation: Only produced when franz-go is enabled.
5458
optional: true
@@ -72,6 +76,8 @@ telemetry:
7276
if_enabled: This metric is deprecated in favor of kafka_broker_throttling_latency and will be removed soon.
7377
kafka_broker_throttling_latency:
7478
enabled: true
79+
stability:
80+
level: development
7581
description: The throttling latency in seconds imposed by the broker when exporting records.
7682
extended_documentation: Only produced when franz-go is enabled.
7783
optional: true
@@ -95,6 +101,8 @@ telemetry:
95101
if_enabled: This metric is deprecated in favor of kafka_exporter_records and will be removed soon.
96102
kafka_exporter_records:
97103
enabled: true
104+
stability:
105+
level: development
98106
description: The number of exported records.
99107
unit: "1"
100108
sum:
@@ -103,6 +111,8 @@ telemetry:
103111
attributes: [node_id, topic, partition, outcome]
104112
kafka_exporter_bytes:
105113
enabled: true
114+
stability:
115+
level: development
106116
description: The size in bytes of exported records seen by the broker.
107117
extended_documentation: Only produced when franz-go is enabled.
108118
optional: true
@@ -113,6 +123,8 @@ telemetry:
113123
attributes: [node_id, topic, partition, outcome]
114124
kafka_exporter_bytes_uncompressed:
115125
enabled: true
126+
stability:
127+
level: development
116128
description: The uncompressed size in bytes of exported messages seen by the client.
117129
unit: By
118130
sum:
@@ -133,6 +145,8 @@ telemetry:
133145
if_enabled: This metric is deprecated in favor of kafka_exporter_write_latency and will be removed soon.
134146
kafka_exporter_write_latency:
135147
enabled: true
148+
stability:
149+
level: development
136150
description: The time it took in seconds to export a batch of records.
137151
unit: s
138152
histogram:

0 commit comments

Comments
 (0)