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/zookeeper] Migrate scraper to new experimental metrics builder #6522

Merged
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
2 changes: 1 addition & 1 deletion receiver/zookeeperreceiver/codegen.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
//go:build !windows
// +build !windows

//go:generate mdatagen metadata.yaml
//go:generate mdatagen --experimental-gen metadata.yaml

package zookeeperreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver"
3 changes: 3 additions & 0 deletions receiver/zookeeperreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ import (

"go.opentelemetry.io/collector/config/confignet"
"go.opentelemetry.io/collector/receiver/scraperhelper"

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

type Config struct {
scraperhelper.ScraperControllerSettings `mapstructure:",squash"`
confignet.TCPAddr `mapstructure:",squash"`
Metrics metadata.MetricsSettings `mapstructure:"metrics"`

// Timeout within which requests should be completed.
Timeout time.Duration `mapstructure:"timeout"`
Expand Down
3 changes: 3 additions & 0 deletions receiver/zookeeperreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/receiver/receiverhelper"
"go.opentelemetry.io/collector/receiver/scraperhelper"

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

const (
Expand Down Expand Up @@ -51,6 +53,7 @@ func createDefaultConfig() config.Receiver {
Endpoint: ":2181",
},
Timeout: defaultTimeout,
Metrics: metadata.DefaultMetricsSettings(),
}
}

Expand Down
304 changes: 0 additions & 304 deletions receiver/zookeeperreceiver/internal/metadata/generated_metrics.go

This file was deleted.

Loading