Skip to content

Commit

Permalink
[receiver/apache] update to use generated status (#19770)
Browse files Browse the repository at this point in the history
This updates the metadata for the receiver to include stability information used to generate the status table.

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
Alex Boten authored Mar 20, 2023
1 parent 0141826 commit e4a2605
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
10 changes: 6 additions & 4 deletions receiver/apachereceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Apache Web Server Receiver

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

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

This receiver fetches stats from a Apache Web Server instance using the `server-status?auto` endpoint.

## Prerequisites
Expand Down Expand Up @@ -38,6 +43,3 @@ The full list of settings exposed for this receiver are documented [here](./conf
## Metrics
Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml)
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
5 changes: 2 additions & 3 deletions receiver/apachereceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import (
)

const (
typeStr = "apache"
stability = component.StabilityLevelBeta
typeStr = "apache"

httpDefaultPort = "80"
httpsDefaultPort = "443"
Expand All @@ -41,7 +40,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
9 changes: 9 additions & 0 deletions receiver/apachereceiver/internal/metadata/generated_status.go

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

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

status:
type: receiver
stability: beta
pipelines: [metrics]
distributions: [contrib]

resource_attributes:
apache.server.name:
description: The name of the Apache HTTP server.
Expand Down

0 comments on commit e4a2605

Please sign in to comment.