You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gi...@apache.org on 2025/05/21 01:53:05 UTC
(camel-quarkus) 13/34: feat(observability-services): use management port
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch camel-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit bc12c593c66575a92c9c9ff9fb795367bf98a7d6
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri Apr 25 11:49:28 2025 +0200
feat(observability-services): use management port
---
.../pages/reference/extensions/observability-services.adoc | 2 ++
.../observability-services/runtime/src/main/doc/usage.adoc | 2 ++
.../runtime/src/main/resources/application.properties | 2 ++
.../observabilityservices/it/ObservabilityServicesTest.java | 12 ++++++++----
4 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/observability-services.adoc b/docs/modules/ROOT/pages/reference/extensions/observability-services.adoc
index 84d4c63736..687c1006f1 100644
--- a/docs/modules/ROOT/pages/reference/extensions/observability-services.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/observability-services.adoc
@@ -83,6 +83,8 @@ The presence of this extension will expose the following endpoints:
|====
+By default, these endpoints are exposed on the management port (`9876`). This value can be changed as any other configuration (in this case, via `quarkus.management.port` application property). You can also disable it (`quarkus.management.enabled=false`) if you want to expose those endpoints in the regular service port (default, `8080`).
+
NOTE: You can configure the endpoints as you'd do normally within each extension configuration.
[id="extensions-observability-services-usage-opentelemetry-configuration"]
diff --git a/extensions/observability-services/runtime/src/main/doc/usage.adoc b/extensions/observability-services/runtime/src/main/doc/usage.adoc
index 72170253c1..6d1f9f960c 100644
--- a/extensions/observability-services/runtime/src/main/doc/usage.adoc
+++ b/extensions/observability-services/runtime/src/main/doc/usage.adoc
@@ -33,6 +33,8 @@ The presence of this extension will expose the following endpoints:
|====
+By default, these endpoints are exposed on the management port (`9876`). This value can be changed as any other configuration (in this case, via `quarkus.management.port` application property). You can also disable it (`quarkus.management.enabled=false`) if you want to expose those endpoints in the regular service port (default, `8080`).
+
NOTE: You can configure the endpoints as you'd do normally within each extension configuration.
== OpenTelemetry configuration
diff --git a/extensions/observability-services/runtime/src/main/resources/application.properties b/extensions/observability-services/runtime/src/main/resources/application.properties
index 37437c7b2c..4daf4eb27d 100644
--- a/extensions/observability-services/runtime/src/main/resources/application.properties
+++ b/extensions/observability-services/runtime/src/main/resources/application.properties
@@ -14,6 +14,8 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
+quarkus.management.enabled=true
+quarkus.management.port=9876
quarkus.micrometer.export.prometheus.path=/observe/metrics
quarkus.smallrye-health.root-path=/observe/health
# Default is disabled: the user must enable it to push traces to the given server
diff --git a/integration-tests/observability-services/src/test/java/org/apache/camel/quarkus/component/observabilityservices/it/ObservabilityServicesTest.java b/integration-tests/observability-services/src/test/java/org/apache/camel/quarkus/component/observabilityservices/it/ObservabilityServicesTest.java
index 895ab8f5f1..47c00ab2dd 100644
--- a/integration-tests/observability-services/src/test/java/org/apache/camel/quarkus/component/observabilityservices/it/ObservabilityServicesTest.java
+++ b/integration-tests/observability-services/src/test/java/org/apache/camel/quarkus/component/observabilityservices/it/ObservabilityServicesTest.java
@@ -40,7 +40,8 @@ class ObservabilityServicesTest {
@Test
void testHealthUpStatus() {
- RestAssured.when().get("/observe/health").then()
+ // Use testing management port
+ RestAssured.when().get("http://localhost:9001/observe/health").then()
.contentType(ContentType.JSON)
.header("Content-Type", containsString("charset=UTF-8"))
.body("status", is("UP"),
@@ -53,7 +54,8 @@ class ObservabilityServicesTest {
@Test
void testLivenessUpStatus() {
- RestAssured.when().get("/observe/health/live").then()
+ // Use testing management port
+ RestAssured.when().get("http://localhost:9001/observe/health/live").then()
.contentType(ContentType.JSON)
.header("Content-Type", containsString("charset=UTF-8"))
.body("status", is("UP"),
@@ -62,7 +64,8 @@ class ObservabilityServicesTest {
@Test
void testReadinessUpStatus() {
- RestAssured.when().get("/observe/health/ready").then()
+ // Use testing management port
+ RestAssured.when().get("http://localhost:9001/observe/health/ready").then()
.contentType(ContentType.JSON)
.header("Content-Type", containsString("charset=UTF-8"))
.body("status", is("UP"),
@@ -71,7 +74,8 @@ class ObservabilityServicesTest {
@Test
void testMetricsStatus() {
- RestAssured.when().get("/observe/metrics").then()
+ // Use testing management port
+ RestAssured.when().get("http://localhost:9001/observe/metrics").then()
.header("Content-Type", containsString("application/openmetrics-text"))
.statusCode(HttpStatus.SC_OK);
}