buildgrid.server.decorators.requestid module
- buildgrid.server.decorators.requestid.track_request_id(f: Func) Func
Decorator to set the request ID ContextVar.
This decorator sets the
ctx_grpc_request_id
ContextVar to a UUID for the duration of the decorated function. This ContextVar is used in logging output to allow log lines for the same request to be identified.