-
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): Add more auth options and update SDK #13857
Conversation
Wavefront is transitioning from 1 supported authentication flavor to 3. For now we'll continue to have the API token option we've always had, but moving forward we'll also have two "CSP" options - CSP is VMware's OAuth provider for VMware products. These options all have different required fields, and putting them into the top-level TOML document for the output is proving hard to document, and makes for a messy conditional code path. I would be interested in doing something like: [[outputs.wavefront]]
url = "https://metrics.wavefront.com"
[[outputs.wavefront.authentication]]
kind = "wavefront-token"
token = "my-token"
[[outputs.wavefront.authentication]]
kind = "csp-api-token"
[[outputs.wavefront.authentication]]
kind = "csp-client-credentials" or maybe the sub-table would be I couldn't find a precedent for that pattern in the Telegraf codebase. Is it worth pursuing? Do any Telegraf folks have any suggestions for how to manage this situation? We're not happy with the documentation of the fields in the sample config right now - based on responses to the above, we'll improve that documentation before merge. |
d8aed1b
to
f9e0cc4
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 update @LukeWinikates! Two minor comments from my side...
Regarding the option scheme/strategy: I think we can keep the top-level options (and the ifs) if we don't expect the number of options to grow much more... However, if you like like I would create auth-style specific structs and option-tables like [wavefront.auth_csp_api]
, [wavefront.auth_csp_app]
, etc.
22ad4f5
to
cb0b141
Compare
@srebhan thanks for your feedback and for the suggestion about the sub-table solution. Since only the client credentials option has several fields to configure, I only extracted a sub-table for that one. I tested the build artifacts on my team's side. I think this PR is ready to be squashed and merged - let us know if you see any other changes we need to make. |
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.
There is one problem with the config layout due to TOML's handling of "tables", see my comment in the code...
@srebhan I think this is good to go now! Not sure why the windows test fails. |
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.
I will push the two whitespace fixes and then we are good.
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 updates. Some comments around the README/sample config. Remember to update in both places.
cd4aa46
to
073b3f9
Compare
…CSP authentication Co-authored-by: Priya Selvaganesan <pselvaganesa@vmware.com> Co-authored-by: Luke Winikates <winikatesl@vmware.com>
ae82ad6
to
fa1ad91
Compare
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 for the continued updates and shepherding of the plugin.
This PR updates the Wavefront output plugin to use the latest version of the Wavefront Go SDK. The new version adds support for additional authentication flavors, and a configuration setting for opting out of sending internal SDK metrics.