From 4ec4feae42ec0a63ba655fd83daa662af9ac883a Mon Sep 17 00:00:00 2001 From: Yun Huang Date: Fri, 4 May 2018 11:42:39 +0800 Subject: Random Inovocation ID Change-Id: Ife66100ea4e926cb525654ce136384b6877f4c33 Issue-ID: MULTICLOUD-220 Signed-off-by: Yun Huang --- windriver/titanium_cloud/middleware.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'windriver/titanium_cloud') 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)) -- cgit 1.2.3-korg