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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Sep 27, 2024

Description:

Similar to open-telemetry/opentelemetry-collector#11273.
This PR makes usage of the NewDefaultClientConfig instead of manually creating the confighttp.ClientConfig struct as part of #35457.

Link to tracking Issue: #35457

Testing:

Documentation:

@ChrsMark ChrsMark requested review from djaglowski and a team as code owners September 27, 2024 10:10
@ChrsMark ChrsMark added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Sep 27, 2024
clientConfig.MaxIdleConns = nil
clientConfig.MaxIdleConnsPerHost = nil
clientConfig.MaxConnsPerHost = nil
clientConfig.IdleConnTimeout = nil
Copy link
Member

@mackjmr mackjmr Oct 1, 2024

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

Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
receiver/nginx Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants