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

fix(outputs.wavefront): update wavefront sdk and use non-deprecated APIs #11560

Merged
merged 4 commits into from
Aug 1, 2022

Conversation

LukeWinikates
Copy link
Contributor

Required for all PRs

The Wavefront output plugin uses APIs from the Wavefront Go SDK that have been deprecated. This PR updates the SDK version and adopts the currently recommended APIs for configuring the Wavefront sender.

@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jul 27, 2022
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 for taking the time to put up this PR!

@powersj powersj 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 Jul 28, 2022
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 @LukeWinikates for the fix. The code looks good, I only would like to see the two new functions to not be exported. Can you please change this?

plugins/outputs/wavefront/wavefront.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Jul 28, 2022
@srebhan srebhan added area/wavefront plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Jul 28, 2022
@srebhan srebhan changed the title fix(wavefront output): update wavefront sdk and use non-deprecated APIs fix(outputs.wavefront): update wavefront sdk and use non-deprecated APIs Jul 28, 2022
@LukeWinikates
Copy link
Contributor Author

@srebhan

I've learned a couple of things about the wavefront SDK deprecations. It might make sense to open an issue for discussing.

It turns out that you can't create a TCP connection in the Wavefront Go SDK unless you use the NewProxySender function, which is one of the deprecated ones. The Wavefront SDK has not just deprecated the old constructors, it has deprecated TCP.

Unfortunately that means my PR needs to be updated, and we have to choose between continuing to use the deprecated functions and introducing a behavior change.

I wonder if folks actually successfully use the TCP connection for the Wavefront output plugin. When my team first tried it, we found that it eventually dies silently because of socket timeouts. #7160 describes the same scenario. For that reason, we've always used the http connection.

I can see a few different options here:

One is to close this PR, and keep using the deprecated APIs

Another would be to make the host/port config style return an http sender, instead of a tcp one. Maybe print a warning about using these fields, and encourage people to switch to the url field.

I'm going to update this PR to follow the latter path - I'd love to know what y'all think would be best here.

@LukeWinikates
Copy link
Contributor Author

Pushing what I have at the moment - I will also make some documentation updates tomorrow.

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.

Looks good to me. Thanks @LukeWinikates for the fix!

Regarding the usage of deprecated functions vs. removal of TCP... I'd say let's first merge this PR as it is better than nothing. Then open an issue and we can discuss on how to handle the issue. It would be nice to know the timeframe for the removal of deprecated functions, maybe we need a new version of the plugin... But let's discuss this in the issue.

@LukeWinikates
Copy link
Contributor Author

Thanks @srebhan & @powersj -- the readme is now updated as well, so hopefully that's everything that this PR needs. I appreciate your feedback!

@srebhan
Copy link
Member

srebhan commented Jul 29, 2022

For the deprecation, can you please annotate the options similar to StringToNumber so that users get a nice deprecation warning when running Telegraf!?

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.

Thanks again for driving these changes!

@srebhan
Copy link
Member

srebhan commented Aug 1, 2022

@LukeWinikates can you please rebase your PR on the latest master to solve the merge conflicts!?

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Aug 1, 2022

@MyaLongmire MyaLongmire merged commit f0aad2f into influxdata:master Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/wavefront fix pr to fix corresponding bug 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.

4 participants