Apache Camel Data metrics
5,283

Created 5/31/2022
Updated 5/31/2022
Revision 2
Categories
Web Servers
Grafana Version >=7.3.5
Datasources
Prometheus

Example of manually set up metrics set up for the Camel route:

Enable routes' out of box metrics with

io.micrometer micrometer-registry-prometheus 1.1.6 org.springframework.boot spring-boot-starter-actuator ${spring-boot.version} org.apache.camel camel-micrometer-starter org.apache.camel camel-micrometer ${camel.version}

@Configuration public class MetricsConfig {

@Bean
public CamelContextConfiguration camelContextConfiguration() {

    return new CamelContextConfiguration() {
        @Override
        public void beforeApplicationStart(CamelContext camelContext) {
            camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
            camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());

        }

        @Override
        public void afterApplicationStart(CamelContext camelContext) {
        }
    };
}

}

Get Dashboard
Download
Copy to Clipboard
Source Grafana.com

Used Metrics 3

  • CamelMessageHistory_seconds_sum

  • name_label

  • :