diff options
Diffstat (limited to 'common/src/main')
-rw-r--r-- | common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java index b0ffb9358c..e0c8d4ba80 100644 --- a/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java +++ b/common/src/main/java/org/onap/so/client/dmaap/rest/DMaaPRestClient.java @@ -52,6 +52,8 @@ public class DMaaPRestClient extends RestClient { } String onapRequestId = UUID.randomUUID().toString(); headerMap.put(ONAPLogConstants.Headers.REQUEST_ID, onapRequestId); - headerMap.put(ONAPLogConstants.Headers.INVOCATION_ID, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID)); + if (MDC.get(ONAPLogConstants.MDCs.REQUEST_ID) != null) { + headerMap.put(ONAPLogConstants.Headers.INVOCATION_ID, MDC.get(ONAPLogConstants.MDCs.REQUEST_ID)); + } } } |