-
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
A new Logz.io output plugin #8202
Conversation
@ssoroka what do you think? |
It's an improvement, but you still have other tests connecting to the logz.io service. I was kind of expecting a |
@ssoroka I think I'm missing something, which test is connecting to the Logz.io server? The connect function just go to initializeSender but not actually connecting to Logz.io's server |
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.
Ok, so I took a closer look at everything and I have two main concerns.
- There's no test of the Write() function. If anything was broken in there, you probably wouldn't know, but at least the code is simple right now.
- I looked closer at the Send() function from https://github.com/logzio/logzio-go/blob/master/logziosender.go, and I noticed that it has its own internal buffer, which competes with Telegraf's buffer, so essentially you've double buffered the output at twice the cost of memory for it. Not only this, but when the second logzio buffer is full, you drop metrics, meaning users can't control the buffer size from the config like other plugins anymore. The fix for this is to remove the use of logzio-go and just use a simple http connection to write the messages out. 90% of that package is buffering anyway, and you can just copy out the one http write function that you need.
Let me know what you think and if you have any questions.
@ssoroka I've changed the implementation to use a default HTTP client |
Hi @ssoroka |
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 think you're good now. I kind of don't like that the connect function is used as an initializer (there's an Init() error
function signature you can use for that), but you'd still need an empty Connect()
function if you did that, so, I'll leave it up to you. Let me know when you're ready to merge.
@ssoroka we're ready to merge :) |
Required for all PRs: