[camel] branch master updated: CAMEL-13967: Fix micrometer example

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch master updated: CAMEL-13967: Fix micrometer example

jamesnetherton-2
This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new f30fa81  CAMEL-13967: Fix micrometer example
f30fa81 is described below

commit f30fa816343b121f4bfa25796108aaef5eb80e65
Author: James Netherton <[hidden email]>
AuthorDate: Wed Sep 11 09:52:15 2019 +0100

    CAMEL-13967: Fix micrometer example
   
    - Added missing dependencies
    - Handle invocation of overloaded scrape() method
---
 examples/camel-example-micrometer/pom.xml                         | 8 ++++++++
 .../org/apache/camel/example/micrometer/ScrapeRouteBuilder.java   | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/examples/camel-example-micrometer/pom.xml b/examples/camel-example-micrometer/pom.xml
index a8fdcc4..eb7a325 100644
--- a/examples/camel-example-micrometer/pom.xml
+++ b/examples/camel-example-micrometer/pom.xml
@@ -57,6 +57,14 @@
             <artifactId>camel-netty-http</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-direct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-timer</artifactId>
+        </dependency>
+        <dependency>
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus</artifactId>
             <version>${micrometer-version}</version>
diff --git a/examples/camel-example-micrometer/src/main/java/org/apache/camel/example/micrometer/ScrapeRouteBuilder.java b/examples/camel-example-micrometer/src/main/java/org/apache/camel/example/micrometer/ScrapeRouteBuilder.java
index d459678..752ba09 100644
--- a/examples/camel-example-micrometer/src/main/java/org/apache/camel/example/micrometer/ScrapeRouteBuilder.java
+++ b/examples/camel-example-micrometer/src/main/java/org/apache/camel/example/micrometer/ScrapeRouteBuilder.java
@@ -43,7 +43,7 @@ public class ScrapeRouteBuilder extends RouteBuilder {
         from("netty-http:http://0.0.0.0:8088/metrics")
                 .routeId("netty-http:scrape")
                 .log(LoggingLevel.INFO, "Scraping metrics")
-                .transform().method(prometheusMeterRegistry, "scrape");
+                .transform().method(prometheusMeterRegistry, "scrape()");
 
     }
 }