Metric tracking within external plugins #15572
Labels
feature request
Requests for new plugin and for new features to existing plugins
waiting for response
waiting for response from contributor
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.31, Windows 10
Docker
No response
Steps to reproduce
Probably the easiest way to reproduce this:
Expected behavior
Receive feedback when a metric has been successfully written to stdout so that the plugin does not get stuck.
Actual behavior
The maximum amount of processed messages will be equal to
max_undelivered_messages
because the metrics are never getting acknowledged.Additional info
I had already created a post about this in the community forum: https://community.influxdata.com/t/metric-tracking-with-external-plugin/34710
I think it is a serious bug that the methods for metric tracking in an external plugin do not work at all, because the accumulator is provided by shim and is processed by it as well. The metrics were simply neglected to be acknowledged under certain circumstances.
Hence my suggestion, to use the two methods
m.Drop()
andm.Reject()
after the call in this linehttps://github.com/influxdata/telegraf/blob/v1.31.0/plugins/common/shim/goshim.go#L121
Yes, the functionality of metric tracking when used in an external plugin would then differ somewhat from the usual application, but it would still provide useful functionality under these circumstances.
The text was updated successfully, but these errors were encountered: