Skip to content

Commit

Permalink
[chore][receiver/purefb] create metadata (#21745)
Browse files Browse the repository at this point in the history
  • Loading branch information
BominRahmani authored May 12, 2023
1 parent f0bc322 commit 54e0635
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 15 deletions.
16 changes: 9 additions & 7 deletions receiver/purefbreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Pure Storage FlashBlade Receiver

| Status | |
| ------------------------ |---------------------|
| Stability | [in-development] |
| Supported pipeline types | metrics |
| Distributions | [contrib] |
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [development]: 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 Pure Storage FlashBlade receiver, receives metrics from Pure Storage FlashBlade via the [Pure Storage FlashBlade OpenMetrics Exporter](https://github.com/PureStorage-OpenConnect/pure-fb-openmetrics-exporter)

Expand Down Expand Up @@ -47,5 +51,3 @@ receivers:
The full list of settings exposed for this receiver are documented [here](./config.go)
with detailed sample configurations [here](./testdata/config.yaml).

[in-development]: https://github.com/open-telemetry/opentelemetry-collector#in-development
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
4 changes: 3 additions & 1 deletion receiver/purefbreceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver/internal/metadata"
)

func TestLoadConfig(t *testing.T) {
Expand All @@ -36,7 +38,7 @@ func TestLoadConfig(t *testing.T) {
expected component.Config
}{
{
id: component.NewID(typeStr),
id: component.NewID(metadata.Type),
expected: &Config{
Settings: &Settings{
ReloadIntervals: &ReloadIntervals{
Expand Down
17 changes: 17 additions & 0 deletions receiver/purefbreceiver/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//go:generate mdatagen metadata.yaml

package purefbreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver"
11 changes: 4 additions & 7 deletions receiver/purefbreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@ import (
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver"
)

// NewFactory creates a factory for Pure Storage FlashBlade receiver.
const (
typeStr = "purefb"
stability = component.StabilityLevelDevelopment
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver/internal/metadata"
)

// NewFactory creates a factory for Pure Storage FlashBlade receiver.
func NewFactory() receiver.Factory {
return receiver.NewFactory(
typeStr,
metadata.Type,
createDefaultConfig,
receiver.WithMetrics(createMetricsReceiver, stability))
receiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability))
}

func createDefaultConfig() component.Config {
Expand Down
12 changes: 12 additions & 0 deletions receiver/purefbreceiver/internal/metadata/generated_status.go

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

8 changes: 8 additions & 0 deletions receiver/purefbreceiver/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
type: purefb

status:
class: receiver
stability:
development: [metrics]
distributions: [contrib]

0 comments on commit 54e0635

Please sign in to comment.