Closed rocktheshan closed 11 months ago
runWithId()
is a separate utility function which is not related with the middleware/plugin you're using. That's because you may use multiple cls-rtracer middlewares/plugins in your application and it's not straightforward which one of them should be used to configure runWithId()
's default behavior.
To fix your code you should provide the id when calling runWithId()
.
In a setup where requestIdFactory is configured to return a map of particular Ids, when we use runWithId without the optional Id parameter, it should use that same requestIdFactory to assign a new map of the required Ids but with the current implementation, it is assigning a uuid id string.