davsclaus commented on PR #30220:
URL: https://github.com/apache/camel/pull/30220#issuecomment-7069349891

   @squakez OK, let's do it your way: only one metrics route policy per route.
   
   @etzel-mes could you change the PR in that direction? A suggestion for where 
the check goes, so it works on every runtime (Camel Main, Spring Boot, Quarkus) 
and not only in Camel Main:
   
   - In `onInit(Route route)` of `MicrometerRoutePolicy` and of 
`OpenTelemetryRoutePolicy`, look at `route.getRoutePolicyList()`. If the route 
already has the other metrics route policy, fail with an 
`IllegalStateException` whose message names both policies and the route id, and 
says to use only one of camel-micrometer or camel-opentelemetry-metrics. The 
modules do not depend on each other, so compare by class name.
   - Change `OpenTelemetryAndMicrometerRoutePolicyTest` to assert that the 
route fails to start, with Micrometer first and with OpenTelemetry first.
   - Add a sentence to the route policy section of both component docs saying 
the two cannot be combined.
   - The separate exchange property names can stay: they cost nothing.
   
   _Claude Code on behalf of Claus Ibsen_
   


-- 
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