From b53dcadf510048d21578ee3e07f39dff97989f45 Mon Sep 17 00:00:00 2001 From: liangke Date: Thu, 3 May 2018 13:19:34 +0800 Subject: Random Inovocation ID Change-Id: If7c343b422e34c34c4df003e0f53cf40be877a53 Issue-ID: MULTICLOUD-220 Signed-off-by: liangke --- vio/vio/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vio/vio/middleware.py b/vio/vio/middleware.py index 161562e..5056d6c 100644 --- a/vio/vio/middleware.py +++ b/vio/vio/middleware.py @@ -45,9 +45,9 @@ class LogContextMiddleware(object): ReqeustID = request.META.get("HTTP_X_TRANSACTIONID", None) if ReqeustID is None: - ReqeustID = uuid.uuid3(uuid.NAMESPACE_URL, SERVICE_NAME) + ReqeustID = str(uuid.uuid3(uuid.NAMESPACE_URL, SERVICE_NAME)) MDC.put("requestID", ReqeustID) - InovocationID = uuid.uuid3(uuid.NAMESPACE_DNS, SERVICE_NAME) + InovocationID = str(uuid.uuid4()) MDC.put("invocationID", InovocationID) MDC.put("serviceName", SERVICE_NAME) MDC.put("serviceIP", self._getLastIp(request)) -- cgit 1.2.3-korg