fix after rebase
This commit is contained in:
parent
8ddb8f9f26
commit
31754635a3
|
|
@ -87,23 +87,22 @@ func (e *Execd) Start(acc telegraf.Accumulator) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Execd) Add(m telegraf.Metric, acc telegraf.Accumulator) {
|
func (e *Execd) Add(m telegraf.Metric, acc telegraf.Accumulator) error {
|
||||||
b, err := e.serializer.Serialize(m)
|
b, err := e.serializer.Serialize(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
acc.AddError(fmt.Errorf("metric serializing error: %w", err))
|
return fmt.Errorf("metric serializing error: %w", err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = e.process.Stdin.Write(b)
|
_, err = e.process.Stdin.Write(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
acc.AddError(fmt.Errorf("error writing to process stdin: %w", err))
|
return fmt.Errorf("error writing to process stdin: %w", err)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We cannot maintain tracking metrics at the moment because input/output
|
// We cannot maintain tracking metrics at the moment because input/output
|
||||||
// is done asynchronously and we don't have any metric metadata to tie the
|
// is done asynchronously and we don't have any metric metadata to tie the
|
||||||
// output metric back to the original input metric.
|
// output metric back to the original input metric.
|
||||||
m.Drop()
|
m.Drop()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *Execd) Stop() error {
|
func (e *Execd) Stop() error {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue