From 40d60912a2de47be35379c5fe786e1d2d0b180c8 Mon Sep 17 00:00:00 2001 From: "Brittany Plummer (bp896r)" Date: Fri, 18 Oct 2019 12:58:21 -0400 Subject: Generate InvocationID UUID on outgoing requests and use X-InvocationID Issue-ID: LOG-1170 Change-Id: I89fd007bf80fbea1a743d6eb4776fddb07103b46 Signed-off-by: Brittany Plummer (bp896r) --- .../src/main/java/org/onap/logging/ref/slf4j/ONAPLogConstants.java | 4 ++-- .../src/test/java/org/onap/logging/ref/slf4j/ONAPLogAdapterTest.java | 4 ++-- .../test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'reference/logging-slf4j/src') diff --git a/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogConstants.java b/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogConstants.java index 77ca084..5357f40 100644 --- a/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogConstants.java +++ b/reference/logging-slf4j/src/main/java/org/onap/logging/ref/slf4j/ONAPLogConstants.java @@ -205,8 +205,8 @@ public final class ONAPLogConstants { /** HTTP X-ONAP-RequestID header. */ public static final String REQUEST_ID = "X-ONAP-RequestID"; - /** HTTP X-ONAP-InvocationID header. */ - public static final String INVOCATION_ID = "X-ONAP-InvocationID"; + /** HTTP X-InvocationID header. */ + public static final String INVOCATION_ID = "X-InvocationID"; /** HTTP X-ONAP-PartnerName header. */ public static final String PARTNER_NAME = "X-ONAP-PartnerName"; diff --git a/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogAdapterTest.java b/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogAdapterTest.java index bc6d96d..e28c22f 100644 --- a/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogAdapterTest.java +++ b/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogAdapterTest.java @@ -140,7 +140,7 @@ public class ONAPLogAdapterTest { http.setServerName("local123"); http.setRemoteAddr("remote123"); http.addHeader("X-ONAP-RequestID", "request123"); - http.addHeader("X-ONAP-InvocationID", "invocation123"); + http.addHeader("X-InvocationID", "invocation123"); http.addHeader("X-ONAP-PartnerName", "partner123"); try { @@ -180,7 +180,7 @@ public class ONAPLogAdapterTest { http.setServerName("local123"); http.setRemoteAddr("remote123"); http.addHeader("X-ONAP-RequestID", "request123"); - http.addHeader("X-ONAP-InvocationID", "invocation123"); + http.addHeader("X-InvocationID", "invocation123"); http.addHeader("X-ONAP-PartnerName", "partner123"); try { diff --git a/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java b/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java index 681b324..d63d2fd 100644 --- a/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java +++ b/reference/logging-slf4j/src/test/java/org/onap/logging/ref/slf4j/ONAPLogConstantsTest.java @@ -60,7 +60,7 @@ public class ONAPLogConstantsTest { @Test public void testHeaders() { assertThat(ONAPLogConstants.Headers.REQUEST_ID, is("X-ONAP-RequestID")); - assertThat(ONAPLogConstants.Headers.INVOCATION_ID, is("X-ONAP-InvocationID")); + assertThat(ONAPLogConstants.Headers.INVOCATION_ID, is("X-InvocationID")); assertThat(ONAPLogConstants.Headers.PARTNER_NAME, is("X-ONAP-PartnerName")); } -- cgit 1.2.3-korg