Skip to content

Commit a8b5f8d

Browse files
authored
[chore] Use string for unit type (open-telemetry#10555)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Uses string type for `unit` field in mdatagen related files. <!-- Issue number if applicable --> #### Link to tracking issue Needed for open-telemetry#10554
1 parent a2696fd commit a8b5f8d

File tree

9 files changed

+41
-41
lines changed

9 files changed

+41
-41
lines changed

cmd/mdatagen/internal/samplereceiver/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ metrics:
110110
optional.metric:
111111
enabled: false
112112
description: "[DEPRECATED] Gauge double metric disabled by default."
113-
unit: 1
113+
unit: "1"
114114
gauge:
115115
value_type: double
116116
attributes: [string_attr, boolean_attr]
@@ -155,7 +155,7 @@ telemetry:
155155
batch_size_trigger_send:
156156
enabled: true
157157
description: Number of times the batch was sent due to a size trigger
158-
unit: 1
158+
unit: "1"
159159
sum:
160160
value_type: int
161161
monotonic: true
@@ -178,7 +178,7 @@ telemetry:
178178
enabled: true
179179
description: This metric is optional and therefore not initialized in NewTelemetryBuilder.
180180
extended_documentation: For example this metric only exists if feature A is enabled.
181-
unit: 1
181+
unit: "1"
182182
optional: true
183183
gauge:
184184
async: true

cmd/mdatagen/testdata/invalid_type_attr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ metrics:
1818
metric:
1919
enabled: true
2020
description: Metric.
21-
unit: 1
21+
unit: "1"
2222
gauge:
2323
value_type: double
2424
attributes: [used_attr]

cmd/mdatagen/testdata/no_type_attr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ metrics:
1717
metric:
1818
enabled: true
1919
description: Metric.
20-
unit: 1
20+
unit: "1"
2121
gauge:
2222
value_type: double
2323
attributes: [used_attr]

cmd/mdatagen/testdata/unused_attribute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ metrics:
2323
metric:
2424
enabled: true
2525
description: Metric.
26-
unit: 1
26+
unit: "1"
2727
gauge:
2828
value_type: double
2929
attributes: [used_attr]

exporter/exporterhelper/metadata.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,79 +12,79 @@ telemetry:
1212
exporter_sent_spans:
1313
enabled: true
1414
description: Number of spans successfully sent to destination.
15-
unit: 1
15+
unit: "1"
1616
sum:
1717
value_type: int
1818
monotonic: true
1919

2020
exporter_send_failed_spans:
2121
enabled: true
2222
description: Number of spans in failed attempts to send to destination.
23-
unit: 1
23+
unit: "1"
2424
sum:
2525
value_type: int
2626
monotonic: true
2727

2828
exporter_enqueue_failed_spans:
2929
enabled: true
3030
description: Number of spans failed to be added to the sending queue.
31-
unit: 1
31+
unit: "1"
3232
sum:
3333
value_type: int
3434
monotonic: true
3535

3636
exporter_sent_metric_points:
3737
enabled: true
3838
description: Number of metric points successfully sent to destination.
39-
unit: 1
39+
unit: "1"
4040
sum:
4141
value_type: int
4242
monotonic: true
4343

4444
exporter_send_failed_metric_points:
4545
enabled: true
4646
description: Number of metric points in failed attempts to send to destination.
47-
unit: 1
47+
unit: "1"
4848
sum:
4949
value_type: int
5050
monotonic: true
5151

5252
exporter_enqueue_failed_metric_points:
5353
enabled: true
5454
description: Number of metric points failed to be added to the sending queue.
55-
unit: 1
55+
unit: "1"
5656
sum:
5757
value_type: int
5858
monotonic: true
5959

6060
exporter_sent_log_records:
6161
enabled: true
6262
description: Number of log record successfully sent to destination.
63-
unit: 1
63+
unit: "1"
6464
sum:
6565
value_type: int
6666
monotonic: true
6767

6868
exporter_send_failed_log_records:
6969
enabled: true
7070
description: Number of log records in failed attempts to send to destination.
71-
unit: 1
71+
unit: "1"
7272
sum:
7373
value_type: int
7474
monotonic: true
7575

7676
exporter_enqueue_failed_log_records:
7777
enabled: true
7878
description: Number of log records failed to be added to the sending queue.
79-
unit: 1
79+
unit: "1"
8080
sum:
8181
value_type: int
8282
monotonic: true
8383

8484
exporter_queue_size:
8585
enabled: true
8686
description: Current size of the retry queue (in batches)
87-
unit: 1
87+
unit: "1"
8888
optional: true
8989
gauge:
9090
value_type: int
@@ -93,7 +93,7 @@ telemetry:
9393
exporter_queue_capacity:
9494
enabled: true
9595
description: Fixed capacity of the retry queue (in batches)
96-
unit: 1
96+
unit: "1"
9797
optional: true
9898
gauge:
9999
value_type: int

processor/batchprocessor/metadata.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ telemetry:
1414
processor_batch_batch_size_trigger_send:
1515
enabled: true
1616
description: Number of times the batch was sent due to a size trigger
17-
unit: 1
17+
unit: "1"
1818
sum:
1919
value_type: int
2020
monotonic: true
2121
processor_batch_timeout_trigger_send:
2222
enabled: true
2323
description: Number of times the batch was sent due to a timeout trigger
24-
unit: 1
24+
unit: "1"
2525
sum:
2626
value_type: int
2727
monotonic: true
2828
processor_batch_batch_send_size:
2929
enabled: true
3030
description: Number of units in the batch
31-
unit: 1
31+
unit: "1"
3232
histogram:
3333
value_type: int
3434
bucket_boundaries: [10, 25, 50, 75, 100, 250, 500, 750, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 50000, 100000]
@@ -42,7 +42,7 @@ telemetry:
4242
processor_batch_metadata_cardinality:
4343
enabled: true
4444
description: Number of distinct metadata value combinations being processed
45-
unit: 1
45+
unit: "1"
4646
sum:
4747
value_type: int
4848
async: true

processor/processorhelper/metadata.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,95 +12,95 @@ telemetry:
1212
processor_accepted_spans:
1313
enabled: true
1414
description: Number of spans successfully pushed into the next component in the pipeline.
15-
unit: 1
15+
unit: "1"
1616
sum:
1717
value_type: int
1818
monotonic: true
1919

2020
processor_refused_spans:
2121
enabled: true
2222
description: Number of spans that were rejected by the next component in the pipeline.
23-
unit: 1
23+
unit: "1"
2424
sum:
2525
value_type: int
2626
monotonic: true
2727

2828
processor_dropped_spans:
2929
enabled: true
3030
description: Number of spans that were dropped.
31-
unit: 1
31+
unit: "1"
3232
sum:
3333
value_type: int
3434
monotonic: true
3535

3636
processor_inserted_spans:
3737
enabled: true
3838
description: Number of spans that were inserted.
39-
unit: 1
39+
unit: "1"
4040
sum:
4141
value_type: int
4242
monotonic: true
4343

4444
processor_accepted_metric_points:
4545
enabled: true
4646
description: Number of metric points successfully pushed into the next component in the pipeline.
47-
unit: 1
47+
unit: "1"
4848
sum:
4949
value_type: int
5050
monotonic: true
5151

5252
processor_refused_metric_points:
5353
enabled: true
5454
description: Number of metric points that were rejected by the next component in the pipeline.
55-
unit: 1
55+
unit: "1"
5656
sum:
5757
value_type: int
5858
monotonic: true
5959

6060
processor_dropped_metric_points:
6161
enabled: true
6262
description: Number of metric points that were dropped.
63-
unit: 1
63+
unit: "1"
6464
sum:
6565
value_type: int
6666
monotonic: true
6767

6868
processor_inserted_metric_points:
6969
enabled: true
7070
description: Number of metric points that were inserted.
71-
unit: 1
71+
unit: "1"
7272
sum:
7373
value_type: int
7474
monotonic: true
7575

7676
processor_accepted_log_records:
7777
enabled: true
7878
description: Number of log records successfully pushed into the next component in the pipeline.
79-
unit: 1
79+
unit: "1"
8080
sum:
8181
value_type: int
8282
monotonic: true
8383

8484
processor_refused_log_records:
8585
enabled: true
8686
description: Number of log records that were rejected by the next component in the pipeline.
87-
unit: 1
87+
unit: "1"
8888
sum:
8989
value_type: int
9090
monotonic: true
9191

9292
processor_dropped_log_records:
9393
enabled: true
9494
description: Number of log records that were dropped.
95-
unit: 1
95+
unit: "1"
9696
sum:
9797
value_type: int
9898
monotonic: true
9999

100100
processor_inserted_log_records:
101101
enabled: true
102102
description: Number of log records that were inserted.
103-
unit: 1
103+
unit: "1"
104104
sum:
105105
value_type: int
106106
monotonic: true

receiver/receiverhelper/metadata.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,47 @@ telemetry:
1212
receiver_accepted_spans:
1313
enabled: true
1414
description: Number of spans successfully pushed into the pipeline.
15-
unit: 1
15+
unit: "1"
1616
sum:
1717
value_type: int
1818
monotonic: true
1919

2020
receiver_refused_spans:
2121
enabled: true
2222
description: Number of spans that could not be pushed into the pipeline.
23-
unit: 1
23+
unit: "1"
2424
sum:
2525
value_type: int
2626
monotonic: true
2727

2828
receiver_accepted_metric_points:
2929
enabled: true
3030
description: Number of metric points successfully pushed into the pipeline.
31-
unit: 1
31+
unit: "1"
3232
sum:
3333
value_type: int
3434
monotonic: true
3535

3636
receiver_refused_metric_points:
3737
enabled: true
3838
description: Number of metric points that could not be pushed into the pipeline.
39-
unit: 1
39+
unit: "1"
4040
sum:
4141
value_type: int
4242
monotonic: true
4343

4444
receiver_accepted_log_records:
4545
enabled: true
4646
description: Number of log records successfully pushed into the pipeline.
47-
unit: 1
47+
unit: "1"
4848
sum:
4949
value_type: int
5050
monotonic: true
5151

5252
receiver_refused_log_records:
5353
enabled: true
5454
description: Number of log records that could not be pushed into the pipeline.
55-
unit: 1
55+
unit: "1"
5656
sum:
5757
value_type: int
5858
monotonic: true

receiver/scraperhelper/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ telemetry:
1212
scraper_scraped_metric_points:
1313
enabled: true
1414
description: Number of metric points successfully scraped.
15-
unit: 1
15+
unit: "1"
1616
sum:
1717
value_type: int
1818
monotonic: true
1919

2020
scraper_errored_metric_points:
2121
enabled: true
2222
description: Number of metric points that were unable to be scraped.
23-
unit: 1
23+
unit: "1"
2424
sum:
2525
value_type: int
2626
monotonic: true

0 commit comments

Comments
 (0)