summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2020-06-30 14:44:00 +0200
committergjoranv <gv@verizonmedia.com>2020-06-30 14:44:00 +0200
commitf74ef83a83f403e2b635c2c8be2f6c359d1d695e (patch)
tree1e92c58412a7f85e71e9f73ce585ee9eab854b18
parent96af74696fc75b262ffe1ad3326db10b8ba6dae5 (diff)
Make ctor public for DI
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/metrics/PrometheusV1Handler.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/handler/metrics/PrometheusV1Handler.java b/container-core/src/main/java/com/yahoo/container/handler/metrics/PrometheusV1Handler.java
index 23b7a62ffa3..e33f2f47828 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/metrics/PrometheusV1Handler.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/metrics/PrometheusV1Handler.java
@@ -1,6 +1,7 @@
package com.yahoo.container.handler.metrics;
import ai.vespa.util.http.VespaHttpClientBuilder;
+import com.google.inject.Inject;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.restapi.Path;
import com.yahoo.restapi.StringResponse;
@@ -30,8 +31,9 @@ public class PrometheusV1Handler extends HttpHandlerBase{
private final String metricsProxyUri;
private final HttpClient httpClient = createHttpClient();
- protected PrometheusV1Handler(Executor executor,
- MetricsProxyApiConfig config) {
+ @Inject
+ public PrometheusV1Handler(Executor executor,
+ MetricsProxyApiConfig config) {
super(executor);
metricsProxyUri = "http://localhost:" + config.metricsPort() + config.prometheusApiPath();
}