Package io.grpc

Class ClientStreamTracer

    • Field Detail


        public static final CallOptions.Key<Long> NAME_RESOLUTION_DELAYED
        Indicates how long the call was delayed, in nanoseconds, due to waiting for name resolution result. If the call option is not set, the call did not experience name resolution delay.
    • Constructor Detail

      • ClientStreamTracer

        public ClientStreamTracer()
    • Method Detail

      • streamCreated

        public void streamCreated​(@TransportAttr
                                  Attributes transportAttrs,
                                  Metadata headers)
        The stream is being created on a ready transport.
        headers - the mutable initial metadata. Modifications to it will be sent to the socket but not be seen by client interceptors and the application.
      • createPendingStream

        public void createPendingStream()
        Name resolution is completed and the connection starts getting established. This method is only invoked on the streams that encounter such delay.

        gRPC buffers the client call if the remote address and configurations, e.g. timeouts and retry policy, are not ready. Asynchronously gRPC internally does the name resolution to get this information. The streams that are processed immediately on ready transports by the time the RPC comes do not go through the pending process, thus this callback will not be invoked.
      • outboundHeaders

        public void outboundHeaders()
        Headers has been sent to the socket.
      • inboundHeaders

        public void inboundHeaders()
        Headers has been received from the server.
      • inboundTrailers

        public void inboundTrailers​(Metadata trailers)
        Trailing metadata has been received from the server.
        trailers - the mutable trailing metadata. Modifications to it will be seen by interceptors and the application.