Closed softmantk closed 1 year ago
requestIdFactory
supports returning any custom primitive value or object. The idea is that whatever you return from it can be later accessed with a rTracer.id()
call, so you can store any object with arbitrary fields there and, maybe, even mutate it at a later point.
Closing this one as the readme is now updated accordingly.
Hi, this question might be wrong but I want to customise the cls-rtracer with additional feature.
Along with requestId, I also want to pass a custom header value and retrieve it later and may be used in my logger to log the info. with
requestIdFactory
I could set a requestId. is it possible to save additional information in the same context, let's say some sessionId? In our application, both are different. Sometimes sessionId might not exist. storing requestId+sessionId as requestId seems not a solution rather feels like a hack.