From 1adca39c8cd3a1a81c41e801ad781d19be5db3dd Mon Sep 17 00:00:00 2001 From: Sara Weiss Date: Thu, 31 Oct 2019 14:41:26 +0200 Subject: register scheduler to work with MetricLogClient Filter Issue-ID: VID-253 Signed-off-by: Sara Weiss Change-Id: Ic624e1c2a4b04d31177c737a5d249e734a4cfb48 --- .../main/java/org/onap/vid/scheduler/SchedulerRestInterface.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vid-app-common/src/main/java/org/onap') diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java index 8d45bee87..a956dc4bb 100644 --- a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java @@ -7,9 +7,9 @@ * Licensed 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. @@ -76,7 +76,7 @@ public class SchedulerRestInterface implements SchedulerRestInterfaceIfc { commonHeaders = Maps.newHashMap(); commonHeaders.put("Authorization", "Basic " + authStringEnc); - syncRestClient = new SyncRestClient(loggingService); + syncRestClient = new SyncRestClient(loggingService, true); logger.info("\t<== Client Initialized \n"); } @@ -94,7 +94,6 @@ public class SchedulerRestInterface implements SchedulerRestInterfaceIfc { loggingService.logRequest(outgoingRequestsLogger, HttpMethod.GET, url); Map requestHeaders = ImmutableMap.builder() .putAll(commonHeaders) - .put(REQUEST_ID_HEADER_KEY, Logging.extractOrGenerateRequestId()) .build(); final HttpResponse response = syncRestClient.get(url, requestHeaders, Collections.emptyMap(), String.class); @@ -128,7 +127,7 @@ public class SchedulerRestInterface implements SchedulerRestInterfaceIfc { loggingService.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url); Map requestHeaders = ImmutableMap.builder() .putAll(commonHeaders) - .put(REQUEST_ID_HEADER_KEY, Logging.extractOrGenerateRequestId()).build(); + .build(); final HttpResponse response = (HttpResponse) syncRestClient.delete(url, requestHeaders, t.getClass()); loggingService.logRequest(outgoingRequestsLogger, HttpMethod.DELETE, url, response); -- cgit 1.2.3-korg