Package brave.rpc
Interface RpcResponseParser
- All Known Implementing Classes:
RpcResponseParser.Default
public interface RpcResponseParser
Use this to control the response data recorded for an
sampled
RPC client or server span.
Here's an example that adds default tags, and if gRPC, the response encoding:
{@code
Tag responseEncoding = new Tag("grpc.response_encoding") { - Since:
- 5.12
- See Also:
RpcRequestParser
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRpcResponseParser.DefaultThe default data policy setsRpcTags.ERROR_CODEtag, and also "error", if there is no exception. -
Field Summary
Fields Modifier and Type Field Description static RpcResponseParserDEFAULT -
Method Summary
Modifier and Type Method Description voidparse(RpcResponse response, TraceContext context, SpanCustomizer span)Implement to choose what data from the RPC response are parsed into the span representing it.
-
Field Details
-
Method Details
-
parse
Implement to choose what data from the RPC response are parsed into the span representing it.Note: This is called after
Span.error(Throwable), which means any "error" tag set here will overwrite what the error parser set.- Since:
- 5.12
- See Also:
RpcResponseParser.Default
-