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

jamesnetherton pushed a commit to branch camel-quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus-examples.git


The following commit(s) were added to refs/heads/camel-quarkus-main by this 
push:
     new 8393690  feat(observability-services): use management port
8393690 is described below

commit 83936904bb531e7977091f44ef0a6ec2d7f4a823
Author: Jiri Ondrusek <ondrusek.j...@gmail.com>
AuthorDate: Wed May 7 13:13:13 2025 +0200

    feat(observability-services): use management port
---
 observability/README.adoc                                  | 14 +++++++-------
 observability/src/main/resources/application.properties    |  1 +
 .../test/java/org/acme/observability/ObservabilityIT.java  |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/observability/README.adoc b/observability/README.adoc
index 69ffd41..caaae31 100644
--- a/observability/README.adoc
+++ b/observability/README.adoc
@@ -98,23 +98,23 @@ It will increment the counter metric each time the Camel 
timer is fired.
 
 === Metrics endpoint
 
-Metrics are exposed on an HTTP endpoint at `/observe/metrics` on port `9000`.
+Metrics are exposed on an HTTP endpoint at `/observe/metrics` on port `9876`.
 
-NOTE: Note we are using a different port (9000) for the management endpoint 
then our application (8080) is listening on.
+NOTE: Note we are using a different port (9876) for the management endpoint 
then our application (8080) is listening on.
 This is configured in `applcation.properties` via 
link:src/main/resources/application.properties#L22[`quarkus.management.enabled 
= true`]. See the 
https://quarkus.io/guides/management-interface-reference[Quarkus management 
interface guide] for more information.
 
 To view all Camel metrics do:
 
 [source,shell]
 ----
-$ curl -s localhost:9000/observe/metrics
+$ curl -s localhost:9876/observe/metrics
 ----
 
 To view only our previously created metrics, use:
 
 [source,shell]
 ----
-$ curl -s localhost:9000/observe/metrics | grep -i 'purpose="example"'
+$ curl -s localhost:9876/observe/metrics | grep -i 'purpose="example"'
 ----
 
 and you should see 3 lines of different metrics (with the same value, as they 
are all triggered by the timer).
@@ -123,16 +123,16 @@ NOTE: Maybe you've noticed the Prometheus output format. 
If you would rather use
 
 === Health endpoint
 
-Camel provides some out of the box liveness and readiness checks. To see this 
working, interrogate the `/observe/health/live` and `/observe/health/ready` 
endpoints on port `9000`:
+Camel provides some out of the box liveness and readiness checks. To see this 
working, interrogate the `/observe/health/live` and `/observe/health/ready` 
endpoints on port `9876`:
 
 [source,shell]
 ----
-$ curl -s localhost:9000/observe/health/live
+$ curl -s localhost:9876/observe/health/live
 ----
 
 [source,shell]
 ----
-$ curl -s localhost:9000/observe/health/ready
+$ curl -s localhost:9876/observe/health/ready
 ----
 
 The JSON output will contain a checks for verifying whether the `CamelContext` 
and each individual route is in the 'Started' state.
diff --git a/observability/src/main/resources/application.properties 
b/observability/src/main/resources/application.properties
index 9e69322..b8b7a64 100644
--- a/observability/src/main/resources/application.properties
+++ b/observability/src/main/resources/application.properties
@@ -20,6 +20,7 @@
 #
 quarkus.banner.enabled = false
 quarkus.management.enabled = true
+quarkus.management.port=9876
 
 # Identifier for the origin of spans created by the application
 quarkus.application.name = camel-quarkus-observability
diff --git 
a/observability/src/test/java/org/acme/observability/ObservabilityIT.java 
b/observability/src/test/java/org/acme/observability/ObservabilityIT.java
index e69623e..8082a2a 100644
--- a/observability/src/test/java/org/acme/observability/ObservabilityIT.java
+++ b/observability/src/test/java/org/acme/observability/ObservabilityIT.java
@@ -24,6 +24,6 @@ public class ObservabilityIT extends ObservabilityTest {
     // Is run in prod mode
     @Override
     protected String getManagementPrefix() {
-        return "http://localhost:9000";;
+        return "http://localhost:9876";;
     }
 }

Reply via email to