+ * @Method - setIpFqdnRequestIDandInvocationIDForEelf
+ * @Params - method, prints method name in EELF log.
+ * @Params- Req, Request used to get RequestId and InvocationId
+ */
+ void setIpFqdnRequestIDandInvocationIDForEelf(String method, HttpServletRequest req) {
+ setIpFqdnForEelf(method);
+ setMDC(req, "X-ONAP-RequestID", MDC_KEY_REQUEST_ID);
+ setMDC(req, "X-InvocationID", "InvocationId");
+ }
+
+ void setMDC(HttpServletRequest req, String headerName, String keyName) {
+ String mdcId = req.getHeader(headerName);
+ if (StringUtils.isBlank(mdcId)) {
+ mdcId = UUID.randomUUID().toString();
+ }
+ MDC.put(keyName, mdcId);
+ }
+
+ /*
+ * @Method - setIpFqdnRequestIdForEelf - Rally:US664892