diff --git a/script/basic/logger.lua b/script/basic/logger.lua index 5dd4b14a..581b2300 100644 --- a/script/basic/logger.lua +++ b/script/basic/logger.lua @@ -5,6 +5,7 @@ local pcall = pcall local pairs = pairs local tunpack = table.unpack local dtraceback = debug.traceback +local qtrack_id = quanta.track_id local lfilter = log.filter local lprint = log.print @@ -50,6 +51,7 @@ function logger.filter(level) end local function logger_output(flag, feature, lvl, lvl_name, fmt, ...) + local trace_id = qtrack_id() local ok, msg = pcall(lprint, lvl, flag, title, feature, fmt, ...) if not ok then local wfmt = "[logger][{}] format failed: {}=> {})" diff --git a/script/feature/span.lua b/script/feature/span.lua index 05836b65..e7752fc8 100644 --- a/script/feature/span.lua +++ b/script/feature/span.lua @@ -3,7 +3,7 @@ local lnow_ms = timer.now_ms local log_debug = logger.debug local jencode = json.encode -local lrandomkey = crypt.randomkey +local lrandomkey = ssl.randomkey local SERVICE_NAME = quanta.name local SERVICE_HOST = quanta.host