Skip to content

Backport PR #16495 to 8.15: Improve pipeline bootstrap error logs#16503

Merged
edmocosta merged 1 commit into8.15from
backport_16495_8.15
Oct 3, 2024
Merged

Backport PR #16495 to 8.15: Improve pipeline bootstrap error logs#16503
edmocosta merged 1 commit into8.15from
backport_16495_8.15

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Oct 3, 2024

Backport PR #16495 to 8.15 branch, original message:


Release notes

Improved pipeline bootstrap error logs, it now includes the cause backtrace giving a hint where this issue occurred.

What does this PR do?

Any exceptions in the CompiledPipeline constructor during the input, filter and output setup will be re-thrown, with the message from the causing exception, but without the original stack trace. Sometimes, only the message isn't enough to identity form where the error is coming from, and adding the cause stacktrace to the logs would be useful for troubleshooting purposes.

Another option would be replacing the CompiledPipeline re-thrown exception stack trace, which is not recommended unless it's strictly necessary.

This PR adds the :cause errors details on the pipeline converge state error logs, which should shed light on those cases where the message isn't clear or does not describe the error source.

Why is it important/What is the impact to the user?

This PR gives users better visibility/understanding on pipeline's bootstrap errors.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files (and/or docker env variables)
  • I have added tests that prove my fix is effective or that my feature works

How to test this PR locally

Try to start a failing/invalid pipeline configuration and check the logs out.

Related issues

This PR adds the cause errors details on the pipeline converge state error logs

(cherry picked from commit e84fb45)
@elastic-sonarqube
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@elasticmachine
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Copy link
Copy Markdown
Contributor

@edmocosta edmocosta left a comment

Choose a reason for hiding this comment

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

LGTM

@edmocosta edmocosta requested a review from andsel October 3, 2024 11:20
Copy link
Copy Markdown
Member

@andsel andsel left a comment

Choose a reason for hiding this comment

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

LGTM

@edmocosta edmocosta merged commit 0d49d92 into 8.15 Oct 3, 2024
@edmocosta edmocosta deleted the backport_16495_8.15 branch October 3, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants