Class StatsTraceContext
java.lang.Object
io.grpc.internal.StatsTraceContext
The stats and tracing information for a stream.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanstatic final StatsTraceContextprivate final StreamTracer[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclientInboundHeaders(Metadata headers) voidclientInboundTrailers(Metadata trailers) voidReturns a copy of the tracer list.voidinboundMessage(int seqNo) voidinboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize) voidinboundUncompressedSize(long bytes) voidinboundWireSize(long bytes) static StatsTraceContextnewClientContext(ClientStreamTracer[] tracers, Attributes transportAtts, Metadata headers) Factory method for the client-side.static StatsTraceContextnewServerContext(List<? extends ServerStreamTracer.Factory> factories, String fullMethodName, Metadata headers) Factory method for the server-side.voidoutboundMessage(int seqNo) voidoutboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) voidoutboundUncompressedSize(long bytes) voidoutboundWireSize(long bytes) voidserverCallStarted(ServerStreamTracer.ServerCallInfo<?, ?> callInfo) <ReqT,RespT>
ContextserverFilterContext(Context context) voidstreamClosed(Status status)
-
Field Details
-
NOOP
-
tracers
-
closed
-
-
Constructor Details
-
StatsTraceContext
StatsTraceContext(StreamTracer[] tracers)
-
-
Method Details
-
newClientContext
public static StatsTraceContext newClientContext(ClientStreamTracer[] tracers, Attributes transportAtts, Metadata headers) Factory method for the client-side. -
newServerContext
public static StatsTraceContext newServerContext(List<? extends ServerStreamTracer.Factory> factories, String fullMethodName, Metadata headers) Factory method for the server-side. -
getTracersForTest
Returns a copy of the tracer list. -
clientOutboundHeaders
public void clientOutboundHeaders()SeeClientStreamTracer.outboundHeaders(). For client-side only.Transport-specific, thus should be called by transport implementations.
-
clientInboundHeaders
SeeClientStreamTracer.inboundHeaders(). For client-side only.Called from abstract stream implementations.
-
clientInboundTrailers
SeeClientStreamTracer.inboundTrailers(Metadata). For client-side only.Called from abstract stream implementations.
-
serverFilterContext
SeeServerStreamTracer.filterContext(Context). For server-side only.Called from
ServerImpl. -
serverCallStarted
SeeServerStreamTracer.serverCallStarted(ServerStreamTracer.ServerCallInfo). For server-side only.Called from
ServerImpl. -
streamClosed
SeeStreamTracer.streamClosed(Status). This may be called multiple times, and only the first value will be taken.Called from abstract stream implementations.
-
outboundMessage
public void outboundMessage(int seqNo) SeeStreamTracer.outboundMessage(int).Called from
Framer. -
inboundMessage
public void inboundMessage(int seqNo) SeeStreamTracer.inboundMessage(int).Called from
MessageDeframer. -
outboundMessageSent
public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) SeeStreamTracer.outboundMessageSent(int, long, long).Called from
Framer. -
inboundMessageRead
public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize) SeeStreamTracer.inboundMessageRead(int, long, long).Called from
MessageDeframer. -
outboundUncompressedSize
public void outboundUncompressedSize(long bytes) SeeStreamTracer.outboundUncompressedSize(long).Called from
Framer. -
outboundWireSize
public void outboundWireSize(long bytes) SeeStreamTracer.outboundWireSize(long).Called from
Framer. -
inboundUncompressedSize
public void inboundUncompressedSize(long bytes) SeeStreamTracer.inboundUncompressedSize(long).Called from
MessageDeframer. -
inboundWireSize
public void inboundWireSize(long bytes) SeeStreamTracer.inboundWireSize(long).Called from
MessageDeframer.
-