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

feat(outputs.wavefront): use common/http to configure http client #14136

Merged

Conversation

LukeWinikates
Copy link
Contributor

Required for all PRs

resolves #14090

This PR adopts Telegraf's common/http struct to configure the http.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 the init() function needs to set a default HTTPClientConfig.
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.

@telegraf-tiger telegraf-tiger bot added area/wavefront feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Oct 17, 2023
@LukeWinikates LukeWinikates force-pushed the wavefront-http-connection-limits branch from c5439e7 to bf9926b Compare October 17, 2023 18:25
Copy link
Member

@srebhan srebhan 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 the nice upgrade @LukeWinikates! The code looks good, just two comments/requests from my side:

  1. 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...
  2. We now do have the possibility to include other configs in the sample.conf by creating a sample.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!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 18, 2023
Copy link
Contributor

@powersj powersj left a 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!

@LukeWinikates
Copy link
Contributor Author

@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 get a new Wavefront SDK version released and update the PR with a proper released version
  • I will update the docs and sample config.

I will circle back after that. Thanks again!

@LukeWinikates LukeWinikates force-pushed the wavefront-http-connection-limits branch from bf9926b to b87c487 Compare October 19, 2023 22:28
@LukeWinikates
Copy link
Contributor Author

@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 httpconfig.HTTPClientConfig fields, using the content from the HTTP output plugin. Then everything that uses httpconfig.HTTPClientConfig could embed that too.

I like the idea of having a single source of truth about all the configuration options for httpconfig.HTTPClientConfig. I'd like to keep it out of scope for this PR.

@telegraf-tiger
Copy link
Contributor

@srebhan srebhan requested a review from powersj October 23, 2023 08:16
Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thank you!

@powersj powersj merged commit 3eed69f into influxdata:master Oct 23, 2023
4 checks passed
@powersj powersj added this to the v1.29.0 milestone Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/wavefront feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit the number of HTTP connection using outputs.wavefront
3 participants