@@ -204,14 +204,10 @@ func (m *OTelManager) Run(ctx context.Context) error {
204204 }
205205 // pass the error to the errCh so the coordinator, unless it's a cancel error
206206 if ! errors .Is (err , context .Canceled ) {
207- << << << < HEAD
208- m .reportErr (ctx , err )
209- == == == =
210207 reportErr (ctx , m .errCh , err )
211208 // reset the restart timer to the next backoff
212209 recoveryDelay := m .recoveryTimer .ResetNext ()
213210 m .logger .Errorf ("collector exited with error (will try to recover in %s): %v" , recoveryDelay .String (), err )
214- >> >> >> > c56581d44 (feat : hybrid elastic agent invoke collector as subprocess (#8248 ))
215211 }
216212 }
217213
@@ -243,22 +239,6 @@ func (m *OTelManager) Run(ctx context.Context) error {
243239 } else {
244240 // either a new configuration or the first configuration
245241 // that results in the collector being started
246- << << << < HEAD
247- if cancel == nil {
248- // no cancel exists so the collector has not been
249- // started. start the collector with this configuration
250- cancel , provider , err = m .startCollector (m .cfg , runErrCh )
251- if err != nil {
252- // failed to create the collector (this is different then
253- // it's failing to run). we do not retry creation on failure
254- // as it will always fail a new configuration is required for
255- // it not to fail (a new configuration will result in the retry)
256- m .reportErr (ctx , err )
257- } else {
258- // all good at the moment (possible that it will fail)
259- m .reportErr (ctx , nil )
260- }
261- == == == =
262242 proc , err = m .execution .startCollector (ctx , m .logger , m .cfg , collectorRunErr , m .statusCh )
263243 if err != nil {
264244 // failed to create the collector (this is different then
@@ -270,7 +250,6 @@ func (m *OTelManager) Run(ctx context.Context) error {
270250 // from the initial delay
271251 recoveryDelay := m .recoveryTimer .ResetInitial ()
272252 m .logger .Errorf ("collector exited with error (will try to recover in %s): %v" , recoveryDelay .String (), err )
273- >> >> >> > c56581d44 (feat : hybrid elastic agent invoke collector as subprocess (#8248 ))
274253 } else {
275254 // all good at the moment (possible that it will fail)
276255 reportErr (ctx , m .errCh , nil )
0 commit comments