Package brave.grpc

Class GrpcParser

java.lang.Object
brave.grpc.GrpcParser
All Implemented Interfaces:
RpcResponseParser
Direct Known Subclasses:
GrpcClientParser, GrpcServerParser

@Deprecated
public class GrpcParser
extends Object
implements RpcResponseParser
Deprecated.
Since 5.12 use parsers in RpcTracing.
  • Constructor Details

  • Method Details

    • parse

      public void parse​(RpcResponse response, TraceContext context, SpanCustomizer span)
      Deprecated.
      Specified by:
      parse in interface RpcResponseParser
    • errorParser

      @Deprecated protected ErrorParser errorParser()
      Deprecated.
      This is only used in Zipkin reporting. Since 5.12, use ZipkinSpanHandler.Builder.errorTag(Tag)
    • spanName

      protected <ReqT,​ RespT> String spanName​(io.grpc.MethodDescriptor<ReqT,​RespT> methodDescriptor)
      Deprecated.
      Returns the span name of the request. Defaults to the full grpc method name.
    • onClose

      protected void onClose​(io.grpc.Status status, io.grpc.Metadata trailers, SpanCustomizer span)
      Deprecated.
      Override to change what data from the status or trailers are parsed into the span modeling it.

      Note: Status.getCause() will be set as Span.error(Throwable) by default. You don't need to parse it here.