Package brave.grpc
Class GrpcServerRequest
- java.lang.Object
-
- brave.Request
-
- brave.rpc.RpcRequest
-
- brave.rpc.RpcServerRequest
-
- brave.grpc.GrpcServerRequest
-
- All Implemented Interfaces:
GrpcRequest
public class GrpcServerRequest extends RpcServerRequest implements GrpcRequest
Allows access gRPC specific aspects of a server request during sampling and parsing.- Since:
- 5.12
- See Also:
GrpcServerResponse
,for a parsing example
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.grpc.ServerCall<?,?>
call()
Returns the server call passed toServerInterceptor.interceptCall(io.grpc.ServerCall<ReqT, RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>)
.io.grpc.Metadata
headers()
Returns the headers passed toServerInterceptor.interceptCall(io.grpc.ServerCall<ReqT, RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>)
.String
method()
io.grpc.MethodDescriptor<?,?>
methodDescriptor()
Returns ServerCall.getMethodDescriptor()} from thecall()
.protected String
propagationField(String keyName)
String
service()
Object
unwrap()
Returns thecall()
-
Methods inherited from class brave.rpc.RpcServerRequest
spanKind
-
Methods inherited from class brave.rpc.RpcRequest
parseRemoteIpAndPort, startTimestamp
-
-
-
-
Method Detail
-
method
public String method()
- Specified by:
method
in classRpcRequest
-
service
public String service()
- Specified by:
service
in classRpcRequest
-
call
public io.grpc.ServerCall<?,?> call()
Returns the server call passed toServerInterceptor.interceptCall(io.grpc.ServerCall<ReqT, RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>)
.- Since:
- 5.12
-
methodDescriptor
public io.grpc.MethodDescriptor<?,?> methodDescriptor()
Returns ServerCall.getMethodDescriptor()} from thecall()
.- Specified by:
methodDescriptor
in interfaceGrpcRequest
- Since:
- 5.12
-
headers
public io.grpc.Metadata headers()
Returns the headers passed toServerInterceptor.interceptCall(io.grpc.ServerCall<ReqT, RespT>, io.grpc.Metadata, io.grpc.ServerCallHandler<ReqT, RespT>)
.- Specified by:
headers
in interfaceGrpcRequest
- Since:
- 5.12
-
propagationField
protected String propagationField(String keyName)
- Overrides:
propagationField
in classRpcServerRequest
-
-