-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
base: main
Are you sure you want to change the base?
[receiver/nginx] Use NewDefaultClientConfig instead of manually creating struct #35452
Conversation
…ing struct Signed-off-by: ChrsMark <[email protected]>
receiver/nginxreceiver/factory.go
Outdated
clientConfig.MaxIdleConns = nil | ||
clientConfig.MaxIdleConnsPerHost = nil | ||
clientConfig.MaxConnsPerHost = nil | ||
clientConfig.IdleConnTimeout = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clientConfig.MaxIdleConns = nil
clientConfig.MaxIdleConnsPerHost = nil
clientConfig.MaxConnsPerHost = nil
clientConfig.IdleConnTimeout = nil
This part can be deleted, for MaxIdleConns, MaxIdleConnsPerHost, MaxConnsPerHost, IdleConnTimeout even if you set to nil here, the same defaults end up being used in the call to ToClient: https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/confighttp/confighttp.go#L136.
Note you may need to update some tests similarly to: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35518/files#diff-f1add4d95d0ec4f45889d7b60c61a9a274ab2f22f5013b9063a6b1baddd660e3R82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank's! I have updated the patch.
Signed-off-by: ChrsMark <[email protected]>
Description:
Similar to open-telemetry/opentelemetry-collector#11273.
This PR makes usage of the
NewDefaultClientConfig
instead of manually creating theconfighttp.ClientConfig
struct as part of #35457.Link to tracking Issue: #35457
Testing:
Documentation: