apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
255 stars 189 forks source link

Micrometer: Router policy should be disabled by default (to be consistent with Camel) #5028

Open JiriOndrusek opened 1 year ago

JiriOndrusek commented 1 year ago

Bug description

As you can see in Camel documentation, RoutePolicyFactory is not enabled by default. CQ should be consistent with this behavior and change default value for property camel.metrics.enableRoutePolicy to false (code)

jamesnetherton commented 1 year ago

The docs state that the default is true:

https://camel.apache.org/components/3.20.x/micrometer-component.html#_sb_option_camel_metrics_enable-route-policy

JiriOndrusek commented 1 year ago

Default is true for CSB, unfurtunately for plain Camel default is false. Because users have to set routePolicy, like in the test. (Explanation in the doc is From Java you just add the factory to the CamelContext as shown below: context.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());

Therefore CQ should default to false and ticket should be reported for CSB also.

zhfeng commented 1 year ago

@JiriOndrusek it can be closed? or is there anything about document we need to do?

JiriOndrusek commented 1 year ago

@zhfeng thanks for noticing the issue!

TBH I still think that my previous comment is right. Let me explain:

I'll prepare a PR which changes this behavior as I suggested above. Therefore we should keep this issue opened.