fix(agent): Skip initialization of second processor state if requested (#16290)
This commit is contained in:
parent
e3ce01abf0
commit
d2e032eb4a
|
|
@ -231,10 +231,12 @@ func (a *Agent) InitPlugins() error {
|
||||||
return fmt.Errorf("could not initialize aggregator %s: %w", aggregator.LogName(), err)
|
return fmt.Errorf("could not initialize aggregator %s: %w", aggregator.LogName(), err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, processor := range a.Config.AggProcessors {
|
if !a.Config.Agent.SkipProcessorsAfterAggregators {
|
||||||
err := processor.Init()
|
for _, processor := range a.Config.AggProcessors {
|
||||||
if err != nil {
|
err := processor.Init()
|
||||||
return fmt.Errorf("could not initialize processor %s: %w", processor.LogName(), err)
|
if err != nil {
|
||||||
|
return fmt.Errorf("could not initialize processor %s: %w", processor.LogName(), err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, output := range a.Config.Outputs {
|
for _, output := range a.Config.Outputs {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue