Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions logstash-core/lib/logstash/java_pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ module LogStash; class JavaPipeline < AbstractPipeline
def initialize(pipeline_config, namespaced_metric = nil, agent = nil)
@logger = self.logger
super pipeline_config, namespaced_metric, @logger, agent

Util::with_logging_thread_context('pipeline.id' => pipeline_id) do
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review note: the pipeline_id method always returns a non-nil ruby-string pipeline id after the super-method in AbstractPipelineExt#initialize has run.

finish_initialization
end
end

def finish_initialization
open_queue

@worker_threads = []
Expand Down Expand Up @@ -126,9 +133,11 @@ def filters?
def start
# Since we start lets assume that the metric namespace is cleared
# this is useful in the context of pipeline reloading
collect_stats
collect_dlq_stats
initialize_flow_metrics
Util::with_logging_thread_context("pipeline.id" => pipeline_id) do
collect_stats
collect_dlq_stats
initialize_flow_metrics
end

@logger.debug("Starting pipeline", default_logging_keys)

Expand Down