File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
logstash-core/lib/logstash Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ module LogStash; class JavaPipeline < AbstractPipeline
4545 def initialize ( pipeline_config , namespaced_metric = nil , agent = nil )
4646 @logger = self . logger
4747 super pipeline_config , namespaced_metric , @logger , agent
48+
49+ Util ::with_logging_thread_context ( 'pipeline.id' => pipeline_id ) do
50+ finish_initialization
51+ end
52+ end
53+
54+ def finish_initialization
4855 open_queue
4956
5057 @worker_threads = [ ]
@@ -126,9 +133,11 @@ def filters?
126133 def start
127134 # Since we start lets assume that the metric namespace is cleared
128135 # this is useful in the context of pipeline reloading
129- collect_stats
130- collect_dlq_stats
131- initialize_flow_metrics
136+ Util ::with_logging_thread_context ( "pipeline.id" => pipeline_id ) do
137+ collect_stats
138+ collect_dlq_stats
139+ initialize_flow_metrics
140+ end
132141
133142 @logger . debug ( "Starting pipeline" , default_logging_keys )
134143
You can’t perform that action at this time.
0 commit comments