Skip to content

Commit

Permalink
[Heartbeat] Remove warning around messages sent outside journeys (#24366
Browse files Browse the repository at this point in the history
) (#24369)

This removes the annoying and useless warning sent when events are
received outside a journey context. This was meant to be a useful
invariant catching weird bugs on the synthetics side. In practice, it
mostly just doubles the output when errors are received due to a
misconfigured environment.

This patch removes this behavior. I don't think there's a strong case to
add it back in, it was always a nice-to-have for a hypothetical
situation.
  • Loading branch information
andrewvc authored Apr 20, 2021
1 parent 8d3ffe9 commit 651a2ad
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
package synthexec

import (
"encoding/json"

"github.com/elastic/beats/v7/libbeat/common/atomic"
"github.com/elastic/beats/v7/libbeat/logp"
)

type ExecMultiplexer struct {
Expand Down Expand Up @@ -36,13 +33,9 @@ func (e ExecMultiplexer) writeSynthEvent(se *SynthEvent) {
e.currentJourney.Store(false)
}

out, err := json.Marshal(se)

se.index = e.eventCounter.Inc()
if hasCurrentJourney {
e.synthEvents <- se
} else {
logp.Warn("received output from synthetics outside of journey scope: %s %s", out, err)
}
}

Expand Down

0 comments on commit 651a2ad

Please sign in to comment.