-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Use confighttp.NewDefaultClientConfig
function to create object of confighttp.ClientConfig
#6641
Comments
@vvydier, this one is also up for grabs, in case you are interested. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
I'm working on this issue. I've noticed that a lot of code in contrib defines different timeout values, and a lot of the values are the same across packages, so I'm thinking a lot of the explicit timeout setting is just copy-pasting. Anyway, I'm going to preserve these changes in my PR because I can't know whether these timeouts are intentional or not. I have a lot of work to do to update all the tests since they mostly assume the timeouts will be set to zero/nil whereas now they are set to the defaults in |
here's the progress I've made so far. The vast majority of the work is tests, which I'll continue burning through tomorrow: Please let me know if you see any issues with this because I'm repeating the same pattern hundreds of times so it would be good to know earlier if it's wrong :D |
worried about uses of HTTPClientSettings like this one:
I think that results in uninitialized struct values if those values are not present in the config when it is unmarshaled here: https://github.com/open-telemetry/opentelemetry-collector/blob/22d3a4d483e970e01cbc71cfee07df3dcd20dda6/confmap/confmap.go#L114 I'm not really familiar with the code, but would it be reasonable to implement the Unmarshaler interface on DefaultHTTPClientSettings? |
Signed-off-by: Bogdan Drutu <[email protected]> Signed-off-by: Bogdan Drutu <[email protected]>
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
I think this is still relevant because the config object still exists and there is a path forward to fixing it, just trying to get some buy in before doing the work. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
I'm closing this, as it's unlikely to be still relevant. If there's still interest in working on this, please reopen. |
This is still relevant |
Gives me:
Quite a few components need to change to accomodate that change. |
Usage to review:
|
**Description:** Modernize the logic of validation by moving to config Validate from the Start function Use the HTTPClientDefaultSettings defaults when setting the config. **Link to tracking Issue:** #6641 **Testing:** Updated tests.
**Description:** Use confighttp.HTTPDefaultClientSettings when configuring the HTTPClientSettings for the httpforwarder extension. **Link to tracking Issue:** #6641
…metry#29931) **Description:** Modernize the logic of validation by moving to config Validate from the Start function Use the HTTPClientDefaultSettings defaults when setting the config. **Link to tracking Issue:** open-telemetry#6641 **Testing:** Updated tests.
…metry#29887) **Description:** Use confighttp.HTTPDefaultClientSettings when configuring the HTTPClientSettings for the httpforwarder extension. **Link to tracking Issue:** open-telemetry#6641
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
DefaultHTTPClientSettings
function to create object of HTTPClientSettings
confighttp.DefaultClientConfig
function to create object of confighttp.ClientConfig
confighttp.DefaultClientConfig
function to create object of confighttp.ClientConfig
confighttp.NewDefaultClientConfig
function to create object of confighttp.ClientConfig
Here's an example pull request, this one fixes the Sumo Logic exporter: #31510 Similar pull requests are needed for all other components that use the |
…Config` (open-telemetry#31510) Use `confighttp.NewDefaultClientConfig` instead of `confighttp.ClientConfig{...}`. **Link to tracking Issue:** open-telemetry#6641 **Testing:** Unit tests
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
In config/confighttp/confighttp.go file 4 new pointer type variables (MaxIdleConns, MaxIdleConnsPerHost, MaxConnsPerHost, IdleConnTimeout) has been introduced. The pointer type is used in order to distinguish the user provided input with no-input as discussed here.
In long run, we want to change those variable types to non-pointers as discussed here, so we have introduced DefaultHTTPClientSettings functions. Once, all the users' of below two repos start to use
DefaultHTTPClientSettings
function to create the object ofHTTPClientSettings
, we'll change those 4 variables's type to non-pointers:This issue is created to track the progress mentioned above.
The text was updated successfully, but these errors were encountered: