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

[confignet] Add DialerTimeout config option #9066

Merged

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented Dec 11, 2023

Description:
Adds a new dialer_timeout config option to confignet to allow configuring the timeout of the connection.

Link to tracking Issue:
Closes #4331

Testing:
Added new unit tests

Documentation:
Updated readme

@TylerHelmuth TylerHelmuth requested review from a team and jpkrohling December 11, 2023 18:32
@TylerHelmuth TylerHelmuth changed the title Add DialerTimeout config option to confignet [confignet] Add DialerTimeout config option to confignet Dec 11, 2023
@TylerHelmuth TylerHelmuth changed the title [confignet] Add DialerTimeout config option to confignet [confignet] Add DialerTimeout config option Dec 11, 2023
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this, I was looking at this Friday, and I'm curious what your thoughts are around whether or not this feature will allow the removal of dialer timeouts configuration in other components.

please take a look at the failing tests

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9b6a18b) 91.49% compared to head (78991d1) 91.47%.
Report is 45 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9066      +/-   ##
==========================================
- Coverage   91.49%   91.47%   -0.03%     
==========================================
  Files         316      320       +4     
  Lines       17181    17187       +6     
==========================================
+ Hits        15720    15722       +2     
  Misses       1165     1165              
- Partials      296      300       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TylerHelmuth
Copy link
Member Author

TylerHelmuth commented Dec 11, 2023

I'm curious what your thoughts are around whether or not this feature will allow the removal of dialer timeouts configuration in other components.

If a component already allowed configuring a dialer_timeout then they must already be doing their own net.DialTimeout, circumventing TCPAddr.Dial/NetAddr.Dial, so they can take advantage of their timeout value. In these cases I suspect the TCPAddr and NetAddr are only being used for their config and not their methods.

The carbonexporter is an example of a Contrib component that does this.

It looks like the signalfx exporter also does this: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/95cb7336823185453e7a6538dc38988ee6596042/exporter/signalfxexporter/internal/dimensions/dimclient.go#L92-L96. But in this case they also take advantage of additional net.Dialer settings that confignet does not support.

This kinda gets to a question about how much of a wrapper confignet needs to be.

config/confignet/confignet.go Outdated Show resolved Hide resolved
config/confignet/confignet.go Show resolved Hide resolved
config/confignet/confignet.go Outdated Show resolved Hide resolved
@bogdandrutu bogdandrutu merged commit 920cf9d into open-telemetry:main Dec 19, 2023
32 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add timeout to confignet
4 participants