Skip to content

Exceptions thrown in CompiledPipeline constructor lose stack trace context #16139

@robbavey

Description

@robbavey

Any Exceptions in the CompiledPipeline constructor during the input, filter and output setup will be re-thrown, with the message from the causing Exception, included, but with the stack trace from that Exception is lost, losing context from exactly where the Exception originates from.

For example, a codec throwing an error in the register method of a codec, will result in an error like

[ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:test, 
:exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (ArgumentError) 
wrong number of arguments (given 4, expected 1..3)", :backtrace=>["org.logstash.config.ir.CompiledPipeline.<init>
(CompiledPipeline.java:120)", "org.logstash.execution.AbstractPipelineExt.initialize(AbstractPipelineExt.java:186)"

giving no hint as to where this issue occurred.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions