Skip to content

Commit ef342d3

Browse files
authored
[scraperhelper] Use {record} unit for log and profile record metrics (#15730)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Correct units for scraper metrics. <!--Authorship attestation. See AGENTS.md for details. AI agents must not check this box on behalf of the user; the human author must check it themselves before the PR is ready for review.--> #### Authorship - [x] I, a human, wrote this pull request description myself. <!--Please delete paragraphs that you did not use before submitting.-->
1 parent 076a5fd commit ef342d3

9 files changed

Lines changed: 29 additions & 16 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
change_type: bug_fix
2+
3+
component: pkg/scraperhelper
4+
5+
note: Use `{record}` instead of `{datapoint}` as the unit of the log record and profile record scraper metrics
6+
7+
issues: [15730]
8+
9+
subtext: |
10+
Affects `otelcol_scraper_scraped_log_records`, `otelcol_scraper_errored_log_records`,
11+
`otelcol_scraper_scraped_profile_records` and `otelcol_scraper_errored_profile_records`.
12+
13+
change_logs: [user]

scraper/scraperhelper/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Number of log records that were unable to be scraped.
1212

1313
| Unit | Metric Type | Value Type | Monotonic | Stability |
1414
| ---- | ----------- | ---------- | --------- | --------- |
15-
| {datapoint} | Sum | Int | true | Alpha |
15+
| {record} | Sum | Int | true | Alpha |
1616

1717
### otelcol_scraper_errored_metric_points
1818

@@ -28,7 +28,7 @@ Number of log records successfully scraped.
2828

2929
| Unit | Metric Type | Value Type | Monotonic | Stability |
3030
| ---- | ----------- | ---------- | --------- | --------- |
31-
| {datapoint} | Sum | Int | true | Alpha |
31+
| {record} | Sum | Int | true | Alpha |
3232

3333
### otelcol_scraper_scraped_metric_points
3434

scraper/scraperhelper/internal/metadata/generated_telemetry.go

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

scraper/scraperhelper/internal/metadatatest/generated_telemetrytest.go

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

scraper/scraperhelper/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ telemetry:
1717
enabled: true
1818
stability: alpha
1919
description: Number of log records that were unable to be scraped.
20-
unit: "{datapoint}"
20+
unit: "{record}"
2121
sum:
2222
value_type: int
2323
monotonic: true
@@ -35,7 +35,7 @@ telemetry:
3535
enabled: true
3636
stability: alpha
3737
description: Number of log records successfully scraped.
38-
unit: "{datapoint}"
38+
unit: "{record}"
3939
sum:
4040
value_type: int
4141
monotonic: true

scraper/scraperhelper/xscraperhelper/documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Number of profile records that were unable to be scraped.
1212

1313
| Unit | Metric Type | Value Type | Monotonic | Stability |
1414
| ---- | ----------- | ---------- | --------- | --------- |
15-
| {datapoint} | Sum | Int | true | Alpha |
15+
| {record} | Sum | Int | true | Alpha |
1616

1717
### otelcol_scraper_scraped_profile_records
1818

1919
Number of profile records successfully scraped.
2020

2121
| Unit | Metric Type | Value Type | Monotonic | Stability |
2222
| ---- | ----------- | ---------- | --------- | --------- |
23-
| {datapoint} | Sum | Int | true | Alpha |
23+
| {record} | Sum | Int | true | Alpha |

scraper/scraperhelper/xscraperhelper/internal/metadata/generated_telemetry.go

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

scraper/scraperhelper/xscraperhelper/internal/metadatatest/generated_telemetrytest.go

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

scraper/scraperhelper/xscraperhelper/metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ telemetry:
1616
enabled: true
1717
stability: alpha
1818
description: Number of profile records that were unable to be scraped.
19-
unit: "{datapoint}"
19+
unit: "{record}"
2020
sum:
2121
value_type: int
2222
monotonic: true
@@ -25,7 +25,7 @@ telemetry:
2525
enabled: true
2626
stability: alpha
2727
description: Number of profile records successfully scraped.
28-
unit: "{datapoint}"
28+
unit: "{record}"
2929
sum:
3030
value_type: int
3131
monotonic: true

0 commit comments

Comments
 (0)