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

   `CamelMicroProfileHealthHelper.applyHealthDetail` adds the full stack trace 
of a failed health check as `error.stacktrace` at every exposure level except 
`oneline`, so a DOWN check whose result carries an exception serialises the 
whole cause chain into the health response at the default level.
   
   `error.stacktrace` is now only added when `camel.health.exposure-level` is 
`full`. `error.message` is still reported at the `default` level. The trace is 
unchanged in the application log.
   
   ### Why
   
   - It matches the documented meaning of the levels: `full` is the level that 
includes all details from the invoked health checks, and the stack trace is the 
most verbose detail there is.
   - It keeps the MicroProfile output aligned with the Spring Boot actuator, 
where the same gating is applied in apache/camel-spring-boot#1929 (CAMEL-18832 
originally aligned the two). Camel Quarkus builds its health responses through 
this module, so it inherits the change with no separate work.
   - camel-main's management endpoint is stricter still and includes 
`error-stacktrace` only when the caller asks for it with `?stackTrace=true`.
   
   ### Behaviour change
   
   At the default exposure level the response no longer contains 
`error.stacktrace`. Documented in the 4.23 upgrade guide; 
`camel.health.exposure-level = full` restores it.
   
   ### Tests
   
   `testHealthCheckCheckedException` and `testExposureLevelDefault` now assert 
the trace is absent at the default level; `testExposureLevelFull` keeps 
asserting it is present. `mvn test -pl 
components/camel-microprofile/camel-microprofile-health` is green.
   
   _Claude Code on behalf of Croway_
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to