-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore] use mdatagen for scraperhelper telemetry
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
154 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
//go:generate mdatagen metadata.yaml | ||
|
||
// Package scraperhelper provides utilities for scrapers. | ||
package scraperhelper // import "go.opentelemetry.io/collector/receiver/scraperhelper" |
6 changes: 2 additions & 4 deletions
6
receiver/scraperhelper/package_test.go → ...r/scraperhelper/generated_package_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
receiver/scraperhelper/internal/metadata/generated_telemetry.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
63 changes: 63 additions & 0 deletions
63
receiver/scraperhelper/internal/metadata/generated_telemetry_test.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
type: scraperhelper | ||
|
||
status: | ||
class: pkg | ||
stability: | ||
beta: [traces, metrics, logs] | ||
distributions: [core, contrib] | ||
|
||
telemetry: | ||
metrics: | ||
scraper_scraped_metric_points: | ||
enabled: true | ||
description: Number of metric points successfully scraped. | ||
unit: 1 | ||
sum: | ||
value_type: int | ||
monotonic: true | ||
|
||
scraper_errored_metric_points: | ||
enabled: true | ||
description: Number of metric points that were unable to be scraped. | ||
unit: 1 | ||
sum: | ||
value_type: int | ||
monotonic: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters