Skip to content

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

Merged
MyaLongmire merged 4 commits intoinfluxdata:masterfrom
LukeWinikates:wavefront-sdk-update
Aug 1, 2022
Merged

fix(outputs.wavefront): update wavefront sdk and use non-deprecated APIs#11560
MyaLongmire merged 4 commits intoinfluxdata:masterfrom
LukeWinikates:wavefront-sdk-update

Conversation

@LukeWinikates
Copy link
Copy Markdown
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
@LukeWinikates LukeWinikates force-pushed the wavefront-sdk-update branch from 24addb3 to b2f3822 Compare July 27, 2022 20:42
Copy link
Copy Markdown
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
Copy Markdown
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?

@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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@LukeWinikates LukeWinikates force-pushed the wavefront-sdk-update branch from 1781585 to 1297d0b Compare July 29, 2022 01:39
Copy link
Copy Markdown
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.

@srebhan srebhan requested a review from powersj July 29, 2022 09:24
@LukeWinikates LukeWinikates force-pushed the wavefront-sdk-update branch from 932d285 to 2113e1c Compare July 29, 2022 17:41
@LukeWinikates
Copy link
Copy Markdown
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
Copy Markdown
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!?

@LukeWinikates LukeWinikates force-pushed the wavefront-sdk-update branch from 2113e1c to 8661c9b Compare July 29, 2022 19:46
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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