summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliangke <lokyse@163.com>2018-05-03 13:19:34 +0800
committerliangke <lokyse@163.com>2018-05-03 13:20:07 +0800
commitb53dcadf510048d21578ee3e07f39dff97989f45 (patch)
tree103cde4d4585988c49505154d2ba2fbede89f2b7
parentf83bd94ac6b23329f7095e1651f910f91e5e5bba (diff)
Random Inovocation ID
Change-Id: If7c343b422e34c34c4df003e0f53cf40be877a53 Issue-ID: MULTICLOUD-220 Signed-off-by: liangke <lokyse@163.com>
-rw-r--r--vio/vio/middleware.py4
1 files 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))