Package brave.rpc

Class RpcResponseParser.Default

  • All Implemented Interfaces:
    RpcResponseParser
    Enclosing interface:
    RpcResponseParser

    public static class RpcResponseParser.Default
    extends Object
    implements RpcResponseParser
    The default data policy sets RpcTags.ERROR_CODE tag, and also "error", if there is no exception.

    Note:The exception will be tagged by default in Zipkin, but if you are using a SpanHandler to another destination, you should process accordingly.

    Since:
    5.12
    • Constructor Detail

      • Default

        public Default()
    • Method Detail

      • parse

        public void parse​(RpcResponse response,
                          brave.propagation.TraceContext context,
                          brave.SpanCustomizer span)
        Description copied from interface: RpcResponseParser
        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.

        Specified by:
        parse in interface RpcResponseParser
        See Also:
        RpcResponseParser.Default