Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/httpcheck] update to use generated status #20276

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions receiver/httpcheckreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# HTTP Check Receiver

| Status | |
| ------------------------ |---------------|
| Stability | [development] |
| Supported pipeline types | metrics |
| Distributions | none |
<!-- status autogenerated section -->
| Status | |
| ------------------------ |-----------|
| Stability | [development] |
| Supported pipeline types | metrics |
| Distributions | [contrib] |

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

The HTTP Check Receiver can be used for synthethic checks against HTTP endpoints. This receiver will make a request to the specified `endpoint` using the
configured `method`. This scraper generates a metric with a label for each HTTP response status class with a value of `1` if the status code matches the
Expand Down Expand Up @@ -42,6 +47,3 @@ receivers:
## Metrics

Details about the metrics produced by this receiver can be found in [documentation.md](./documentation.md)

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
5 changes: 2 additions & 3 deletions receiver/httpcheckreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import (
)

const (
typeStr = "httpcheck"
stability = component.StabilityLevelDevelopment
typeStr = "httpcheck"
)

var errConfigNotHTTPCheck = errors.New("config was not a HTTP check receiver config")
Expand All @@ -40,7 +39,7 @@ func NewFactory() receiver.Factory {
return receiver.NewFactory(
typeStr,
createDefaultConfig,
receiver.WithMetrics(createMetricsReceiver, stability))
receiver.WithMetrics(createMetricsReceiver, metadata.Stability))
}

func createDefaultConfig() component.Config {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions receiver/httpcheckreceiver/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: httpcheckreceiver

status:
type: receiver
stability: development
pipelines: [metrics]
distributions: [contrib]
warnings: []

resource_attributes:

attributes:
Expand Down