elastic / elastic/logstash

Separate pipeline lifecycle out from pipeline code

Open
#5,679 4 comments 1 reaction 0 assignees View on GitHub
code cleanup design enhancement
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Currently the pipeline/batch class contains metrics/logging statements that can make refactoring and navigating the code tricky. To clean things up we should add a notion of observers to the pipeline for common lifecycle events. We need to first define these events based on current needs, but I'm picturing defining observers with something like:

To be clear logging should mostly NOT happen here, but be inline, but I can see cases where it might make sense.

``` ruby
class PipelineObserver
def on_init
end
def on_run
end
def on_batch_deque
end
def on_batch_filter
end
def on_stop
end
end
# etc. etc.
end
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.