You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by ze...@apache.org on 2026/06/01 19:32:59 UTC

(streampipes) branch dev updated: fix: restore Prometheus actuator endpoint (#4519)

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

tenthe pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git


The following commit(s) were added to refs/heads/dev by this push:
     new 1eec716e60 fix: restore Prometheus actuator endpoint (#4519)
1eec716e60 is described below

commit 1eec716e60b3d39c419c69ada306b6596ab75c2b
Author: Philipp Zehnder <te...@users.noreply.github.com>
AuthorDate: Mon Jun 1 21:32:53 2026 +0200

    fix: restore Prometheus actuator endpoint (#4519)
---
 .vscode/launch.json                                |  3 +-
 docker-compose.yml                                 |  1 +
 streampipes-service-base/pom.xml                   |  4 ++
 .../tests/monitoring/prometheusEndpoint.spec.ts    | 48 ++++++++++++++++++++++
 4 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/.vscode/launch.json b/.vscode/launch.json
index ba272fd9bf..820f9edbf9 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -25,7 +25,8 @@
         "SP_CORE_EXTENSION_TRANSPORT_MODE": "nats",
         "SP_EXTENSION_TRANSPORT_MODE": "nats",
         "SP_EXTENSION_REQUEST_TOPIC_PREFIX": "sp.extensions.request",
-        "SP_DEBUG": "false"
+        "SP_DEBUG": "false",
+        "SP_SETUP_PROMETHEUS_ENDPOINT":"true"
       }
     },
     {
diff --git a/docker-compose.yml b/docker-compose.yml
index 843dad0235..a9b74eaac1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -36,6 +36,7 @@ services:
     image: streampipes_backend:release-validation
     environment:
       - SP_PRIORITIZED_PROTOCOL=nats
+      - SP_SETUP_PROMETHEUS_ENDPOINT=true
     depends_on:
       - couchdb
     volumes:
diff --git a/streampipes-service-base/pom.xml b/streampipes-service-base/pom.xml
index 18066bffd4..c4acac5a69 100644
--- a/streampipes-service-base/pom.xml
+++ b/streampipes-service-base/pom.xml
@@ -74,6 +74,10 @@
             <groupId>io.micrometer</groupId>
             <artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
         </dependency>
+        <dependency>
+            <groupId>io.micrometer</groupId>
+            <artifactId>micrometer-registry-prometheus</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
diff --git a/ui/cypress/tests/monitoring/prometheusEndpoint.spec.ts b/ui/cypress/tests/monitoring/prometheusEndpoint.spec.ts
new file mode 100644
index 0000000000..2df2ae84d9
--- /dev/null
+++ b/ui/cypress/tests/monitoring/prometheusEndpoint.spec.ts
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+describe('Prometheus actuator endpoint', () => {
+    it('exposes Prometheus metrics through the backend actuator', () => {
+        cy.login();
+
+        cy.window().then(win => {
+            const auth = {
+                bearer: win.localStorage.getItem('auth-token'),
+            };
+
+            cy.request({
+                url: '/streampipes-backend/actuator',
+                auth,
+            }).then(response => {
+                expect(response.status).to.eq(200);
+                expect(response.body._links.prometheus.href).to.contain(
+                    '/streampipes-backend/actuator/prometheus',
+                );
+            });
+
+            cy.request({
+                url: '/streampipes-backend/actuator/prometheus',
+                auth,
+            }).then(response => {
+                expect(response.status).to.eq(200);
+                expect(response.body).to.contain('# HELP');
+                expect(response.body).to.not.contain('No static resource');
+            });
+        });
+    });
+});