You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "bartoszpop (via GitHub)" <gi...@apache.org> on 2026/03/02 14:58:36 UTC

[PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

bartoszpop opened a new pull request, #21681:
URL: https://github.com/apache/camel/pull/21681

   # Description
   
   When running Camel JBang, any YAML parsing errors are handled in picocli.CommandLine#handleUnhandled and printed to System.err. As a result, these exceptions are not captured by OTEL-compliant monitoring systems (e.g., Grafana).
   
   This pr is alternative to https://github.com/apache/camel/pull/21671
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
   
   <!--
   # *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
   -->
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful subject line and body.
   
   <!--
   If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
   -->
   
   - [x] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
   
   <!--
   You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
   
   You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
   -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #21681:
URL: https://github.com/apache/camel/pull/21681#issuecomment-3988816916

   yeah but camel run is running camel the other commands are not


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

Posted by "bartoszpop (via GitHub)" <gi...@apache.org>.
bartoszpop commented on PR #21681:
URL: https://github.com/apache/camel/pull/21681#issuecomment-3987941111

   > Would this not cause every command to log twice in this case;
   
   Yes, but your solution does the same. It first logs via SLF4J and then writes to System.err at `picocli.CommandLine#handleUnhandled`. The only difference introduced by this PR is that it applies to all commands, not just `camel run`. That said, I’m fine with either approach, as long as the error is logged via SLF4J so it can be published to Grafana.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #21681:
URL: https://github.com/apache/camel/pull/21681#issuecomment-3985099082

   Would this not cause every command to log twice in this case; which is not desired. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus closed pull request #21681: CAMEL-23111 - YAML parsing errors not published to OTEL
URL: https://github.com/apache/camel/pull/21681


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] CAMEL-23111 - YAML parsing errors not published to OTEL [camel]

Posted by "bartoszpop (via GitHub)" <gi...@apache.org>.
bartoszpop commented on PR #21681:
URL: https://github.com/apache/camel/pull/21681#issuecomment-3984923521

   @davsclaus, re CAMEL-23111, I was thinking about setting a custom `picocli.CommandLine#executionExceptionHandler`  to cover all commands. Wdyt?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org