-
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
Make Wavefront internal sender's buffer size configurable #8002
Make Wavefront internal sender's buffer size configurable #8002
Conversation
Thanks for the PR! We'll take a look and let you know if we have any comments. @prydin If you have any feedback that'd be great. |
Looks good to me. |
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 guess at this point I don't understand why we would want to define these on the plugin. These are settings that are globally available already, and it doesn't appear that the plugin needs to access these.
#batch_size = 10000 | ||
|
||
## Interval (in seconds) at which to flush data. Defaults to 5 seconds. | ||
#flush_interval_seconds = 5 |
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.
flush_interval, metric_buffer_limit and metric_batch_size are set automatically and override-able on outputs. Typically we don't add these to the output config readme, as they can be overridden on any output, and adding them to the config is going to conflict with those values.
Ok, I see the issue. To clarify, the problem is that Possible options: What's the problem we're trying to solve here? I don't see an open issue. |
@ssoroka Thanks for the review. The corresponding issue is #7409 -- |
@ssoroka Please take a look at my previous comment if you get a chance. These new config params pertain only to the Wavefront output plugin's behavior and I don't believe they conflict with their influx counterparts, but let me know if I'm mistaken. |
After reading the issue, I'm concerned that this change won't resolve the problem. Wavefront should not have its own internal buffer. You end up with two buffers, and it doesn't matter what the size is, it's going to eventually drop metrics. Wavefront should instead be blocking and actually writing the metrics out when passed batches of 1000 (agent.metric_batch_size) metrics, because Telegraf is managing the buffer, and keeping track of retries on failures. Said another way, because Wavefront is not blocking and applying backpressure, it's not communicating with Telegraf that the buffer is full and to slow down. Due to this lack of communication, Telegraf happily sends all the metrics in, resulting in overflowing the wavefront buffer. I'd recommend removing the wavefront buffer and sending the metrics immediately when passed a batch, and blocking until it succeeds or fails. If for some reason you really must have double buffers (I still think this is a mistake), then wavefront needs to block when the buffer is full, until there is room in the buffer to accept the new batch, not return an error and drop messages. cc @prydin |
closing this in favor of #8165 |
Required for all PRs:
Updating Wavefront Output Plugin with buffer size configuration option (#7409) and related config options.