Skip to content

Commit

Permalink
Enable skipping the recombine processor
Browse files Browse the repository at this point in the history
  • Loading branch information
RoryCrispin committed Aug 7, 2024
1 parent 1a6df98 commit a080642
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/stanza/operator/transformer/recombine/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ func (t *Transformer) Process(ctx context.Context, e *entry.Entry) error {
// Lock the recombine operator because process can't run concurrently
t.Lock()
defer t.Unlock()
// Short circuit if the "if" condition does not match
skip, err := t.Skip(ctx, e)
if err != nil {
return t.HandleEntryError(ctx, e, err)
}
if skip {
return t.Write(ctx, e)
}

// Get the environment for executing the expression.
// In the future, we may want to provide access to the currently
Expand Down

0 comments on commit a080642

Please sign in to comment.