grpc / grpc/grpc-rust

Add debug spans for codec tracing

Open
#1,759 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Feature Request

### Crates

tonic

### Motivation

We've had some clients that have, for some reason, been really slow at sending up body bytes. This would be easier to confirm if we could see that the decoding process was taking up a certain amount of time, and could be done by providing some tracing spans at the debug level that could be enabled to expose the time spend in request decoding, which often spends some time waiting for data to arrive over the wire.

### Proposal

Add some tracing debug spans for the codecs so that consumers can use tracing to identify potential stalls in decoding of a request. This could add a bit more weight to the state of the decoder, but the overall cost is generally a couple of bytes per connection, and if debug spans aren't enabled, these will always be disabled values.

### Alternatives

The only other option has been inference, but the time spent here is difficult to separate out from other causes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.