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/nginx] Use NewDefaultClientConfig instead of manually creating struct #35452

Merged
11 changes: 6 additions & 5 deletions receiver/nginxreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ func createDefaultConfig() component.Config {
cfg := scraperhelper.NewDefaultControllerConfig()
cfg.CollectionInterval = 10 * time.Second

clientConfig := confighttp.NewDefaultClientConfig()
clientConfig.Endpoint = "http://localhost:80/status"
clientConfig.Timeout = 10 * time.Second

return &Config{
ControllerConfig: cfg,
ClientConfig: confighttp.ClientConfig{
Endpoint: "http://localhost:80/status",
Timeout: 10 * time.Second,
},
ControllerConfig: cfg,
ClientConfig: clientConfig,
MetricsBuilderConfig: metadata.DefaultMetricsBuilderConfig(),
}
}
Expand Down