-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Contribution of plugin logstash-output-loginsight #6809
Comments
@andrewvc How do the tests look here? |
This is awesome. /cc @acchen97 & @suyograo WDYT about adding this to the logstash-plugins org after some changes are made? First, I want to say this is very clean code for someone writing ruby the very first time. I do see some changes that need to be made. The main one is that we're trying to move all outputs away from stud::buffer. The good news is that this would primarily mean deleting code for you. Instead of The second change I would make is moving to use the http client mixin. This is a standard interface for inputs/filters/outputs that will create a manticore client for you with all sorts of esoteric options baked in. See the source of https://github.com/logstash-plugins/logstash-output-http for an example. Looking forward to seeing this plugin move forward . Thanks for the excellent work @alanjcastonguay |
@alanjcastonguay you may even consider making your output a subclass of the HTTP output which does a lot of work for you. Does that make sense? You'd only need to add the logic required to modify the HTTP request for loginsight. |
@alanjcastonguay thanks for the great contribution. +1 to the changes @andrewvc mentioned and it's encouraged to proceed with them. We're happy to work with you on getting this plugin moved over and docs created, but it will likely have to wait until closer to mid-June due to priorities. |
@alanjcastonguay , thanks for the contribution. |
@andrewvc I appreciate your feedback. The things you brought up are areas I didn't feel comfortable with. This API expects to handle 1-500 events in a batch, but I wasn't sure the best way to drain that many off a queue for submission. And I don't grok subclassing (assuming that's what you mean by mixin) in ruby. Can you provide more specific guidance on each of these (in mid-June)? |
@andrewvc I took a crack at implementing your suggestions above. I didn't find a way to batch submissions in this style. Can you take a look at https://github.com/alanjcastonguay/logstash-output-loginsight/tree/subclass-http and let me know if that's in-line with your thinking? |
@andrewvc I merged those changes and pushed version 0.3.0 to rubygems on 2017-09-14. Have you had a chance to review? |
I have authored and want to contribute https://github.com/alanjcastonguay/logstash-output-loginsight
CLA was signed. Tests pass locally with
rspec
. This is my first attempt at writing ruby, so it definitely needs another set of eyes.The text was updated successfully, but these errors were encountered: