@ThreadSafe public final class StatsTraceContext extends Object
Modifier and Type | Field and Description |
---|---|
static StatsTraceContext |
NOOP |
Modifier and Type | Method and Description |
---|---|
void |
clientInboundHeaders()
|
void |
clientInboundTrailers(Metadata trailers)
|
void |
clientOutboundHeaders()
|
List<StreamTracer> |
getTracersForTest()
Returns a copy of the tracer list.
|
void |
inboundMessage(int seqNo)
|
void |
inboundMessageRead(int seqNo,
long optionalWireSize,
long optionalUncompressedSize)
|
void |
inboundUncompressedSize(long bytes)
|
void |
inboundWireSize(long bytes)
|
static StatsTraceContext |
newClientContext(CallOptions callOptions,
Attributes transportAttrs,
Metadata headers)
Factory method for the client-side.
|
static StatsTraceContext |
newServerContext(List<? extends ServerStreamTracer.Factory> factories,
String fullMethodName,
Metadata headers)
Factory method for the server-side.
|
void |
outboundMessage(int seqNo)
|
void |
outboundMessageSent(int seqNo,
long optionalWireSize,
long optionalUncompressedSize)
|
void |
outboundUncompressedSize(long bytes)
|
void |
outboundWireSize(long bytes)
|
void |
serverCallStarted(ServerStreamTracer.ServerCallInfo<?,?> callInfo)
|
<ReqT,RespT> |
serverFilterContext(Context context)
|
void |
streamClosed(Status status)
|
public static final StatsTraceContext NOOP
public static StatsTraceContext newClientContext(CallOptions callOptions, Attributes transportAttrs, Metadata headers)
public static StatsTraceContext newServerContext(List<? extends ServerStreamTracer.Factory> factories, String fullMethodName, Metadata headers)
public List<StreamTracer> getTracersForTest()
public void clientOutboundHeaders()
ClientStreamTracer.outboundHeaders()
. For client-side only.
Transport-specific, thus should be called by transport implementations.
public void clientInboundHeaders()
ClientStreamTracer.inboundHeaders()
. For client-side only.
Called from abstract stream implementations.
public void clientInboundTrailers(Metadata trailers)
ClientStreamTracer.inboundTrailers(io.grpc.Metadata)
. For client-side only.
Called from abstract stream implementations.
public <ReqT,RespT> Context serverFilterContext(Context context)
ServerStreamTracer.filterContext(io.grpc.Context)
. For server-side only.
Called from ServerImpl
.
public void serverCallStarted(ServerStreamTracer.ServerCallInfo<?,?> callInfo)
ServerStreamTracer.serverCallStarted(io.grpc.ServerStreamTracer.ServerCallInfo<?, ?>)
. For server-side only.
Called from ServerImpl
.
public void streamClosed(Status status)
StreamTracer.streamClosed(io.grpc.Status)
. This may be called multiple times, and only the first
value will be taken.
Called from abstract stream implementations.
public void outboundMessage(int seqNo)
StreamTracer.outboundMessage(int)
.
Called from Framer
.
public void inboundMessage(int seqNo)
StreamTracer.inboundMessage(int)
.
Called from MessageDeframer
.
public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize)
StreamTracer.outboundMessageSent(int, long, long)
.
Called from Framer
.
public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize)
StreamTracer.inboundMessageRead(int, long, long)
.
Called from MessageDeframer
.
public void outboundUncompressedSize(long bytes)
StreamTracer.outboundUncompressedSize(long)
.
Called from Framer
.
public void outboundWireSize(long bytes)
StreamTracer.outboundWireSize(long)
.
Called from Framer
.
public void inboundUncompressedSize(long bytes)
StreamTracer.inboundUncompressedSize(long)
.
Called from MessageDeframer
.
public void inboundWireSize(long bytes)
StreamTracer.inboundWireSize(long)
.
Called from MessageDeframer
.
Copyright © 2019. All rights reserved.