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

[chore] [receiver/couchdb] Use confighttp.NewDefaultClientConfig instead of manually creating struct #35613

Merged

Conversation

mackjmr
Copy link
Member

@mackjmr mackjmr commented Oct 4, 2024

Description:
This PR makes usage of NewDefaultClientConfig instead of manually creating the confighttp.ClientConfig struct.

Link to tracking Issue: #35457

…ead of manually creating struct

**Description:**
This PR makes usage of `NewDefaultClientConfig` instead of manually creating the confighttp.ClientConfig struct.

**Link to tracking Issue:** open-telemetry#35457
@@ -26,14 +26,14 @@ func NewFactory() receiver.Factory {
}

func createDefaultConfig() component.Config {
clientConfig := confighttp.NewDefaultClientConfig()
clientConfig.TLSSetting = configtls.ClientConfig{}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
clientConfig.TLSSetting = configtls.ClientConfig{}
clientConfig.TLSSetting = configtls.NewDefaultClientConfig()

Should we update this reference too it's the same underlying concern?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are for confighttp. I can create another issue for configtls similarely to #35457 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, another issue would probably be good. It looks like the goal is to move all configs over the the NewDefault... initialization, as noted here, but I understand it's unrelated to this PR so we don't have to do it yet. 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmitryax dmitryax merged commit fc405e3 into open-telemetry:main Oct 5, 2024
156 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 5, 2024
ghost pushed a commit to sematext/opentelemetry-collector-contrib that referenced this pull request Oct 9, 2024
…ead of manually creating struct (open-telemetry#35613)

**Description:**
This PR makes usage of `NewDefaultClientConfig` instead of manually
creating the confighttp.ClientConfig struct.

**Link to tracking Issue:** open-telemetry#35457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants