Package brave.rpc
Interface RpcResponseParser
-
- All Known Implementing Classes:
RpcResponseParser.Default
public interface RpcResponseParser
Use this to control the response data recorded for ansampled 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 class
RpcResponseParser.Default
The default data policy setsRpcTags.ERROR_CODE
tag, and also "error", if there is no exception.
-
Field Summary
Fields Modifier and Type Field Description static RpcResponseParser
DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
parse(RpcResponse response, brave.propagation.TraceContext context, brave.SpanCustomizer span)
Implement to choose what data from the RPC response are parsed into the span representing it.
-
-
-
Field Detail
-
DEFAULT
static final RpcResponseParser DEFAULT
-
-
Method Detail
-
parse
void parse(RpcResponse response, brave.propagation.TraceContext context, brave.SpanCustomizer span)
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
-
-