Package brave.grpc

Class GrpcClientRequest

All Implemented Interfaces:
GrpcRequest

public final class GrpcClientRequest
extends RpcClientRequest
implements GrpcRequest
Allows access gRPC specific aspects of a client request during sampling and parsing.
Since:
5.12
See Also:
GrpcClientResponse, for a parsing example
  • Method Summary

    Modifier and Type Method Description
    io.grpc.ClientCall<?,​?> call()
    Returns the client call generated by Channel.newCall(io.grpc.MethodDescriptor<RequestT, ResponseT>, io.grpc.CallOptions) during ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
    io.grpc.CallOptions callOptions()
    Returns the call options passed to ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
    io.grpc.Metadata headers()
    Returns the headers passed to ClientCall.start(ClientCall.Listener, Metadata).
    String method()  
    io.grpc.MethodDescriptor<?,​?> methodDescriptor()
    Returns the method descriptor passed to ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
    protected void propagationField​(String keyName, String value)  
    String service()  
    Object unwrap()
    Returns the call()

    Methods inherited from class brave.rpc.RpcClientRequest

    spanKind

    Methods inherited from class brave.rpc.RpcRequest

    parseRemoteIpAndPort, startTimestamp

    Methods inherited from class brave.Request

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Method Details

    • unwrap

      public Object unwrap()
      Returns the call()
      Specified by:
      unwrap in class Request
    • method

      public String method()
      Specified by:
      method in class RpcRequest
    • service

      public String service()
      Specified by:
      service in class RpcRequest
    • methodDescriptor

      public io.grpc.MethodDescriptor<?,​?> methodDescriptor()
      Returns the method descriptor passed to ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
      Specified by:
      methodDescriptor in interface GrpcRequest
      Since:
      5.12
    • callOptions

      public io.grpc.CallOptions callOptions()
      Returns the call options passed to ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
      Since:
      5.12
    • call

      public io.grpc.ClientCall<?,​?> call()
      Returns the client call generated by Channel.newCall(io.grpc.MethodDescriptor<RequestT, ResponseT>, io.grpc.CallOptions) during ClientInterceptor.interceptCall(io.grpc.MethodDescriptor<ReqT, RespT>, io.grpc.CallOptions, io.grpc.Channel).
      Since:
      5.12
    • headers

      public io.grpc.Metadata headers()
      Returns the headers passed to ClientCall.start(ClientCall.Listener, Metadata).
      Specified by:
      headers in interface GrpcRequest
      Since:
      5.12
    • propagationField

      protected void propagationField​(String keyName, String value)
      Overrides:
      propagationField in class RpcClientRequest