diff options
author | Morten Tokle <mortent@verizonmedia.com> | 2020-11-10 14:29:37 +0100 |
---|---|---|
committer | Morten Tokle <mortent@verizonmedia.com> | 2020-11-10 14:31:13 +0100 |
commit | cf38ecd0ec3c835a00d860eb30223800e82a4b92 (patch) | |
tree | aee5ba2edff84c3b051dae75946de813add441e8 /controller-server | |
parent | 908ccf17e86b14efc5f074cb999079cec11e6fbf (diff) |
Remove http client types
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java index 1e455f92195..8604e5e48fe 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java @@ -4,6 +4,7 @@ package com.yahoo.vespa.hosted.controller.athenz.impl; import com.google.inject.Inject; import com.yahoo.jdisc.Metric; import com.yahoo.vespa.athenz.api.AthenzIdentity; +import com.yahoo.vespa.athenz.client.ErrorHandler; import com.yahoo.vespa.athenz.client.zms.DefaultZmsClient; import com.yahoo.vespa.athenz.client.zms.ZmsClient; import com.yahoo.vespa.athenz.client.zts.DefaultZtsClient; @@ -11,7 +12,6 @@ import com.yahoo.vespa.athenz.client.zts.ZtsClient; import com.yahoo.vespa.athenz.identity.ServiceIdentityProvider; import com.yahoo.vespa.hosted.controller.api.integration.athenz.AthenzClientFactory; import com.yahoo.vespa.hosted.controller.athenz.config.AthenzConfig; -import org.apache.http.client.methods.HttpUriRequest; import java.net.URI; import java.util.HashMap; @@ -65,9 +65,8 @@ public class AthenzClientFactoryImpl implements AthenzClientFactory { return true; } - private void reportMetricErrorHandler(HttpUriRequest request, Exception error) { - String hostname = request.getURI().getHost(); - Metric.Context context = metricContexts.computeIfAbsent(hostname, host -> metrics.createContext( + private void reportMetricErrorHandler(ErrorHandler.RequestProperties request, Exception error) { + Metric.Context context = metricContexts.computeIfAbsent(request.hostname(), host -> metrics.createContext( Map.of(ATHENZ_SERVICE_DIMENSION, host, EXCEPTION_DIMENSION, error.getClass().getSimpleName()))); metrics.add(METRIC_NAME, 1, context); |