aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrittany Plummer (bp896r) <bp896r@att.com>2020-05-08 14:30:42 -0400
committerBrittany Plummer (bp896r) <bp896r@att.com>2020-05-08 18:15:41 -0400
commitcd0ed1ae3993256c8d7d5d27eafe0a77c991ee2e (patch)
tree2b55643786cfc90bf1dfa4523d799fe31ebccdf1
parent8b57e24bae51533e57a71897ffb1f68326beee80 (diff)
Set elapsedTime for metric log
Issue-ID: LOG-1212 Change-Id: I7e53fd4c5887351b4b7f0fd8da1e4ae28cd2284a Signed-off-by: Brittany Plummer (bp896r) <bp896r@att.com>
-rw-r--r--reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/AbstractBaseMetricLogFilter.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/AbstractBaseMetricLogFilter.java b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/AbstractBaseMetricLogFilter.java
index fc5ae95..85a21ea 100644
--- a/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/AbstractBaseMetricLogFilter.java
+++ b/reference/logging-filter/logging-filter-base/src/main/java/org/onap/logging/filter/base/AbstractBaseMetricLogFilter.java
@@ -86,14 +86,14 @@ public abstract class AbstractBaseMetricLogFilter<Request, Response> extends MDC
}
}
setServerFQDN();
+ setLogTimestamp();
+ setElapsedTimeInvokeTimestamp();
}
protected String extractRequestID() {
String requestId = MDC.get(ONAPLogConstants.MDCs.REQUEST_ID);
if (requestId == null || requestId.isEmpty()) {
requestId = UUID.randomUUID().toString();
- setLogTimestamp();
- setElapsedTimeInvokeTimestamp();
logger.trace("No value found in MDC when checking key {} value will be set to {}",
ONAPLogConstants.MDCs.REQUEST_ID, requestId);
MDC.put(ONAPLogConstants.MDCs.REQUEST_ID, requestId);