Define an error handling behavior of Serializer.SerializeBatch function #8830
Labels
feature request
Requests for new plugin and for new features to existing plugins
help wanted
Request for community participation, code, contribution
size/l
1 week or more effort
Feature Request
Currently, the serializer interface doesn't define error handling behavior of SerializeBatch function.
If an error is occurred in the middle of processing multiple metrics, whether of not return the rest of succeeded metrics is up to the implementation.
Proposal:
Define the expected behaviour and add it in the comment/document.
Current behavior:
Undefined.
It made each serializer uses different strategy.
For example,
influx
: https://github.com/influxdata/telegraf/blob/master/plugins/serializers/influx/influx.go#L114-L122graphite
: https://github.com/influxdata/telegraf/blob/master/plugins/serializers/graphite/graphite.go#L102-L111wavefront
: https://github.com/influxdata/telegraf/blob/master/plugins/serializers/wavefront/wavefront.go#L102-L105Desired behavior:
Having well defined set of behavior including
[]error
Use case:
This is important to reduce possible confusions of end users and plugin writers.
The text was updated successfully, but these errors were encountered: