You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/11/13 10:57:42 UTC
[camel-kamelets-examples] branch main updated: Use micrometer instead
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets-examples.git
The following commit(s) were added to refs/heads/main by this push:
new 4f9e13b Use micrometer instead
4f9e13b is described below
commit 4f9e13b6ab48e825f58f72cf1e221ea177ce6225
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Nov 13 11:57:32 2022 +0100
Use micrometer instead
---
jbang/metrics/README.adoc | 18 +++++++++++++-----
jbang/metrics/metrics.yaml | 2 +-
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/jbang/metrics/README.adoc b/jbang/metrics/README.adoc
index b883a9c..9f6eeed 100644
--- a/jbang/metrics/README.adoc
+++ b/jbang/metrics/README.adoc
@@ -1,6 +1,6 @@
== Metrics
-This example shows MicroProfile Metrics with Camel JBang.
+This example shows using Micrometer metrics with Camel JBang.
=== Install JBang
@@ -59,23 +59,31 @@ $ camel run metrics.yaml --console
----
Then you can browse: http://localhost:8080/q/dev to introspect the running Camel application,
-such as browsing the microprofile-metrics, where you can see the captured statistics.
+such as browsing the micrometer, where you can see the captured statistics.
The web console outputs data in text/html by default when using a web browser.
-However you can obtain the data in JSon format such as the microprofile-metrics with the following curl command:
+However you can obtain the data in JSon format such as the micrometer with the following curl command:
[source,bash]
----
-curl -s -H "Accept: application/json" http://localhost:8080/q/dev/microprofile-metrics
+curl -s -H "Accept: application/json" http://localhost:8080/q/dev/micrometer
----
And if you have `jq` installed to nicely format and output JSon in color then run:
[source,bash]
----
-curl -s -H "Accept: application/json" http://localhost:8080/q/dev/microprofile-metrics | jq
+curl -s -H "Accept: application/json" http://localhost:8080/q/dev/micrometer | jq
----
+The metrics can also be displayed from the shell via:
+
+[source,sh]
+----
+$ camel get micrometer
+----
+
+
=== Help and contributions
diff --git a/jbang/metrics/metrics.yaml b/jbang/metrics/metrics.yaml
index e00c7d5..b0462f1 100644
--- a/jbang/metrics/metrics.yaml
+++ b/jbang/metrics/metrics.yaml
@@ -3,6 +3,6 @@
uri: kamelet:timer-source?message=hello
steps:
- to:
- uri: microprofile-metrics:counter:messages
+ uri: micrometer:counter:messages
- log:
message: ${body}
\ No newline at end of file