summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorØyvind Grønnesby <oyving@verizonmedia.com>2019-07-12 16:17:29 +0200
committerØyvind Grønnesby <oyving@verizonmedia.com>2019-07-12 16:17:29 +0200
commit9c2dc5c6a7f8e2d9647f39d5b141003285c7a5e3 (patch)
tree59f76f1788971c7a32f4fbed0885754508a4bad6
parent9549a8005480a3fe61fb087e359a4a442180819f (diff)
Only offer metrics in the context of an instance
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
index 421030fa77b..3f790b31813 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
@@ -104,7 +104,7 @@ public class ApplicationHandler extends HttpHandler {
return applicationRepository.getLogs(applicationId, hostname, apiParams);
}
- if (isMetricsRequest(request) && false) {
+ if (isMetricsRequest(request)) {
return applicationRepository.getMetrics();
}
@@ -148,9 +148,9 @@ public class ApplicationHandler extends HttpHandler {
"http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/serviceconverge",
"http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/serviceconverge/*",
"http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/clustercontroller/*/status/*",
+ "http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*/metrics",
"http://*/application/v2/tenant/*/application/*/environment/*/region/*/instance/*",
"http://*/application/v2/tenant/*/application/*/logs",
- "http://*/application/v2/metrics",
"http://*/application/v2/tenant/*/application/*");
}
@@ -160,7 +160,7 @@ public class ApplicationHandler extends HttpHandler {
}
private static boolean isMetricsRequest(HttpRequest request) {
- return getBindingMatch(request).groupCount() == 1 &&
+ return getBindingMatch(request).groupCount() == 7 &&
request.getUri().getPath().endsWith("/metrics");
}