tonic icon indicating copy to clipboard operation
tonic copied to clipboard

How to get grpc-status in Layer?

Open njskalski opened this issue 1 year ago • 1 comments

Hi,

I implemented a Layer similar to this one https://docs.rs/tonic-tracing-opentelemetry/0.19.0/src/tonic_tracing_opentelemetry/middleware/server.rs.html , and I want to access "grpc-status" field that is not among the headers, it seems to be added later from "trailers".

Is there a way to either read it earlier OR trigger an action when it's available?

njskalski avatar Jul 26 '24 14:07 njskalski

You should be able to access in response only so you need to wrap service's response with your own future

DoumanAsh avatar Aug 20 '24 03:08 DoumanAsh