open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.95k stars 2.29k forks source link

Use confighttp.NewDefaultClientConfig instead of manually creating struct #35457

Open mackjmr opened 4 days ago

mackjmr commented 4 days ago

Component(s)

No response

Describe the issue you're reporting

Related to second point in: https://github.com/open-telemetry/opentelemetry-collector/issues/9478#issuecomment-2241891068.

Move away from manually creating confighttp.ClientConfig in favor of using confighttp.NewDefaultClientConfig.

This is necessary for the following components:

This will be done following conditions:

For the third point, I am unsure of which approach to follow. An example is the otlphttpexporter (#11273), where previously MaxIdleConns, MaxIdleConnsPerHost, MaxConnsPerHost and IdleConnTimeout were unset (equivalent of nil), which is different than the default which has values.

Core collector issue: https://github.com/open-telemetry/opentelemetry-collector/issues/11274

crobert-1 commented 1 day ago

Removing needs triage, sounds like a good idea to me.