Package brave.rpc

Interface RpcRequestParser

  • All Known Implementing Classes:
    RpcRequestParser.Default

    public interface RpcRequestParser
    Use this to control the request data recorded for an sampled RPC client or server span.

    Here's an example that adds default tags, and if Apache Dubbo, Java arguments:

    
     rpcTracing = rpcTracingBuilder
       .clientRequestParser((req, context, span) -> {
          RpcRequestParser.DEFAULT.parse(req, context, span);
          if (req instanceof DubboRequest) {
            tagArguments(((DubboRequest) req).invocation().getArguments());
          }
       }).build();
     

    Note: This type is safe to implement as a lambda, or use as a method reference as it is effectively a FunctionalInterface. It isn't annotated as such because the project has a minimum Java language level 6.

    Since:
    5.12
    See Also:
    RpcResponseParser