airlift / drift

An annotation-based Java library for creating Thrift serializable types and services.
Apache License 2.0
242 stars 92 forks source link

interceptor function #131

Open booksongs opened 9 months ago

booksongs commented 9 months ago

I want to implement the interceptor function in Thrift, for example, adding a link traceId. How should this be implemented? Can you provide some guidance?

electrum commented 9 months ago

Can you explain more about what you're trying to do? Where would this value be added?

booksongs commented 9 months ago

Can you explain more about what you're trying to do? Where would this value be added?

I want to implement a trace capability, where the trace ID can be passed down the RPC chain and printed in the log. I've noticed other RPC frameworks have this kind of feature, usually implemented based on interceptors. So, how should we implement this functionality in our drift?