kezhenxu94 commented on code in PR #104:
URL: 
https://github.com/apache/skywalking-nginx-lua/pull/104#discussion_r855091125


##########
lib/skywalking/tracing_context.lua:
##########
@@ -109,14 +109,21 @@ function _M.newNoOP()
     return {is_noop = true}
 end
 
-function _M.new(serviceName, serviceInstanceName)
+function _M.new(serviceName, serviceInstanceName, requestId)
     if serviceInstanceName == nil or serviceName == nil then
         return _M.newNoOP()
     end
 
+    -- use request_id as trace_id if it is present
+    local trace_id = Util.newID()
+    local segment_id = trace_id
+    if requestId ~= nil then
+        trace_id = requestId
+    end

Review Comment:
   If request id is nil, the trace id is the same as segment id?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to