summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/middleware.py
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-05-04 11:42:39 +0800
committerYun Huang <yun.huang@windriver.com>2018-05-04 11:42:39 +0800
commit4ec4feae42ec0a63ba655fd83daa662af9ac883a (patch)
tree9efdea6fc7a5203c05293ff827ad491cca002ee5 /windriver/titanium_cloud/middleware.py
parentd9e4a0167f390e662b26aa7526c58daf8c047d14 (diff)
Random Inovocation ID
Change-Id: Ife66100ea4e926cb525654ce136384b6877f4c33 Issue-ID: MULTICLOUD-220 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'windriver/titanium_cloud/middleware.py')
-rw-r--r--windriver/titanium_cloud/middleware.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/windriver/titanium_cloud/middleware.py b/windriver/titanium_cloud/middleware.py
index cae9e9b1..f2618e06 100644
--- a/windriver/titanium_cloud/middleware.py
+++ b/windriver/titanium_cloud/middleware.py
@@ -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))