-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(outputs.wavefront): use common/http to configure http client #14136
feat(outputs.wavefront): use common/http to configure http client #14136
Conversation
c5439e7
to
bf9926b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice upgrade @LukeWinikates! The code looks good, just two comments/requests from my side:
- Please update to the
github.com/wavefronthq/wavefront-sdk-go v0.14.1
package as soon as it is released. IIRC dependabot will not touch git-versions so we need to do this manually... - We now do have the possibility to include other configs in the
sample.conf
by creating asample.conf.in
and call the generator in the plugin file. Checkout the http input plugin for an example on TLS parameters... It would be nice if we could include those parameters here to present all options to the user... This can be a separate PR though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I do want to see the docs and sample config updated as a part of the final PR please.
I was not planning on landing given your comment about doing a final release of the client library. Do you still want to hold off?
Thanks again!
@srebhan @powersj thanks for the fast feedback! @powersj yes, I would like to wait to merge this until we ship an updated Wavefront SDK release with the new configuration options exposed.
I will circle back after that. Thanks again! |
bf9926b
to
b87c487
Compare
@srebhan @powersj just updated this branch to use the Wavefront SDK version released today, plus an update to the sample config. Looking at @srebhan's comment about config file includes, I considered the possibility of extracting a config template that covers TLS options and idle connection settings, but I didn't take the plunge yet. The least complicated option would be to make a template that covers all of the I like the idea of having a single source of truth about all the configuration options for |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Required for all PRs
resolves #14090
This PR adopts Telegraf's
common/http
struct to configure thehttp.Client
used by the Wavefront output plugin. This should be a harmonious way of exposing a variety of HTTP client customizations and tuning parameters, including the idle connection settings requested in #14909.I removed existing fields for TLS and HTTP Timeout configuration, because the HTTPClientConfig exposes the same fields.
question
: I am not sure if theinit()
function needs to set a defaultHTTPClientConfig
.note
: this is currently using a branch of the Wavefront SDK. I want to get feedback on the PR early. Prior to final review, we (the Wavefront Go SDK maintainers) will release a new SDK version, and I will update this PR accordingly.