Random Inovocation ID 19/46119/1
authorYun Huang <yun.huang@windriver.com>
Fri, 4 May 2018 03:42:39 +0000 (11:42 +0800)
committerYun Huang <yun.huang@windriver.com>
Fri, 4 May 2018 03:42:39 +0000 (11:42 +0800)
Change-Id: Ife66100ea4e926cb525654ce136384b6877f4c33
Issue-ID: MULTICLOUD-220
Signed-off-by: Yun Huang <yun.huang@windriver.com>
windriver/titanium_cloud/middleware.py

index cae9e9b..f2618e0 100644 (file)
@@ -49,10 +49,10 @@ class LogContextMiddleware(object):
         # generate one.
         ReqeustID = request.META.get("HTTP_X_TRANSACTIONID", None)
         if ReqeustID is None:
-            ReqeustID = uuid.uuid3(uuid.NAMESPACE_URL, settings.MULTIVIM_VERSION)
+            ReqeustID = str(uuid.uuid3(uuid.NAMESPACE_URL, settings.MULTIVIM_VERSION))
         MDC.put("requestID", ReqeustID)
         # generate the reqeust id
-        InvocationID = uuid.uuid3(uuid.NAMESPACE_DNS, settings.MULTIVIM_VERSION)
+        InvocationID = str(uuid.uuid4())
         MDC.put("invocationID", InvocationID)
         MDC.put("serviceName", settings.MULTIVIM_VERSION)
         MDC.put("serviceIP", self._getLastIp(request))