If your function starts a new thread and needs to log from that thread, ensure you pass the context argument into the thread. The context contains thread-local storage and the current invocation_id, ...