Expand description
Opt-in capture of gRPC request messages on the grpc_request tracing target.
GrpcRequestLogLayer tees each request body flowing through it, parses the gRPC message
framing, and emits one trace-level event per message with the payload as the raw protobuf
message bytes, base64-encoded. Capture is scoped to methods resolvable in the same
FileDescriptorSets the server registers for gRPC reflection: they gate which paths are
captured and label the service/method span fields, but the payload itself is never decoded
against them. Emitted at trace level, so it is a no-op unless an operator opts in by enabling
the target:
RUST_LOG="info,grpc_request=trace"— capture every method.RUST_LOG='info,grpc_request[{service=sui.rpc.v2.LedgerService}]=trace'— capture a single service (or[{method=GetObject}]for a single method). The service and method are recorded on the enclosing span soEnvFilterspan-field directives can subset them. Undertelemetry-subscribersthis additionally requiresTOKIO_SPAN_LEVEL=trace, because its global level filter otherwise rejects the trace-levelcapturespan the directive matches against. Use the bare-braces form shown here: directives that also name the span (grpc_request[capture{...}]) are not recognized by the capture gate. Note that undertelemetry-subscribersa field-scoped directive subsets the output, not the capture overhead — non-matching requests are still parsed before their events are dropped.- Combine with
RUST_LOG_TAILS="grpc_request=/var/log/sui/grpc_request.jsonl"(seetelemetry-subscribers) to additionally write the events to a dedicated newline-delimited JSON file, e.g. as a replay corpus.
Payloads may contain sensitive arguments.
Structs§
- Grpc
Request Log - Middleware that captures decoded gRPC request messages on the
TARGETtracing target. - Grpc
Request LogLayer - Layer that applies
GrpcRequestLogto a service. - Request
LogBody - Request body for
GrpcRequestLog, teeing data chunks into a gRPC frame parser while passing them through unchanged.
Constants§
- TARGET
- The tracing target captured requests are emitted on.