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: Add Clarify output plugin #13220

Merged
merged 9 commits into from
May 22, 2023

Conversation

bbergshaven
Copy link
Contributor

Add plugin to support writing metrics to Clarify.

Required for all PRs

  • Updated associated README.md.
  • Wrote appropriate unit tests.
  • Pull request title or commits are in [conventional commit format]

Added output plugin to write metric to Clarify.
www.clarify.io

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 2, 2023
@srebhan srebhan added new plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels May 2, 2023
@srebhan srebhan self-assigned this May 2, 2023
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 cool plugin @bbergshaven! I do have some minor comments in the code. One bigger issue is the missing test-cases. Please provide unit-tests especially for the key-and metric-generation! In the best case, you provide a full integration test, but you should at least be able to provide a mock backend to check the validity of generated metrics...

plugins/outputs/clarify/README.md Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Outdated Show resolved Hide resolved
@bbergshaven bbergshaven force-pushed the clarify-output-plugin branch 2 times, most recently from 7a6c7de to fce840e Compare May 3, 2023 13:31
@bbergshaven
Copy link
Contributor Author

bbergshaven commented May 3, 2023

Thank you @srebhan for a great and swift review.
I have taken most of your feedback into consideration and pushed fixes.
Left some comments on some of the specific parts that I would like to keep.

Looking forward to hear back from you!

plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
@bbergshaven bbergshaven force-pushed the clarify-output-plugin branch 2 times, most recently from 5238d76 to fc61ce9 Compare May 9, 2023 20:57
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.

@bbergshaven thanks for the update! I have some more smaller comments, but we are quite close...

docs/LICENSE_OF_DEPENDENCIES.md Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify_test.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify_test.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Whoops, forgot to submit my review..

plugins/outputs/clarify/README.md Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Outdated Show resolved Hide resolved
@bbergshaven bbergshaven force-pushed the clarify-output-plugin branch 2 times, most recently from 0883521 to 9629b6e Compare May 15, 2023 22:19
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.

Still some formatting comments and simplifications...

internal/type_conversions.go Outdated Show resolved Hide resolved
internal/type_conversions.go Outdated Show resolved Hide resolved
internal/type_conversions.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/sample.conf Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
Add plugin to support writing metrics to Clarify.
- fix change requests
- add tests
Fix failing tests due to the fact that FieldList returns the fields as a slice in an undefined order.
- Add missing header to sample.conf and README
- Add user configurable tag to specify tag to use for inputID
- Remove ambiguous default value for optional config option
- Move client setup from Connect to Init method.
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/clarify.go Outdated Show resolved Hide resolved
plugins/outputs/clarify/README.md Outdated Show resolved Hide resolved
- simplify bool type conversion
- test credentials to ensure only one type is used
- fix error messages
- correctly indent sample.conf
- Update README
@Hipska Hipska 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 May 22, 2023
@telegraf-tiger
Copy link
Contributor

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 you very much for your effort and contribution @bbergshaven!

@srebhan srebhan assigned powersj and unassigned srebhan May 22, 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.

Thanks for this - Will the Tools or Integration page of clarify.io get updated to reflect this?

The ID and series name creation does concern me. While I understand the need to differentiate data, it seems like if you have multiple tags and the order switched around, this could cause confusion?

@powersj powersj merged commit df166cf into influxdata:master May 22, 2023
@srebhan srebhan added this to the v1.27.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin new 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.

4 participants