Apache Camel Data metrics

Dashboard

Metrics that are produced by Apache Camel 1) out of the box per each route 2) manually added to meter the critical parts of the Camel routes
Last updated: a month ago

Start with Grafana Cloud and the new FREE tier. Includes 10K series Prometheus or Graphite Metrics and 50gb Loki Logs

Downloads: 1

Reviews: 0

  • camel.png
    camel.png

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

<to uri="micrometer:timer:camel.cache?action=start" /> <to uri="cache://ourCacheExample?maxElementsInMemory=10&eternal=true" /> <to uri="micrometer:timer:camel.cache?action=stop" />

Enable routes' out of box metrics with

<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> <version>1.1.6</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> <version>${spring-boot.version}</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-micrometer-starter</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-micrometer</artifactId> <version>${camel.version}</version> </dependency>

@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 this dashboard:
16354
Dependencies: