Class OpenTelemetryTracingModule.ServerTracer

java.lang.Object
io.grpc.StreamTracer
io.grpc.ServerStreamTracer
io.grpc.opentelemetry.OpenTelemetryTracingModule.ServerTracer
Enclosing class:
OpenTelemetryTracingModule

private final class OpenTelemetryTracingModule.ServerTracer extends io.grpc.ServerStreamTracer
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.ServerStreamTracer

    io.grpc.ServerStreamTracer.Factory, io.grpc.ServerStreamTracer.ServerCallInfo<ReqT,RespT>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
     
    private final io.opentelemetry.api.trace.Span
     
    (package private) int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ServerTracer(String fullMethodName, io.opentelemetry.api.trace.Span remoteSpan)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.grpc.Context
    filterContext(io.grpc.Context context)
     
    void
    inboundMessage(int seqNo)
     
    void
    inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize)
     
    void
     
    void
    outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize)
     
    void
    streamClosed(io.grpc.Status status)
    Record a finished stream and mark the current time as the end time.

    Methods inherited from class io.grpc.ServerStreamTracer

    serverCallStarted, serverCallStarted

    Methods inherited from class io.grpc.StreamTracer

    inboundWireSize, outboundMessage, outboundUncompressedSize, outboundWireSize

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • span

      private final io.opentelemetry.api.trace.Span span
    • streamClosed

      volatile int streamClosed
    • seqNo

      private int seqNo
  • Constructor Details

    • ServerTracer

      ServerTracer(String fullMethodName, @Nullable io.opentelemetry.api.trace.Span remoteSpan)
  • Method Details

    • streamClosed

      public void streamClosed(io.grpc.Status status)
      Record a finished stream and mark the current time as the end time.

      Can be called from any thread without synchronization. Calling it the second time or more is a no-op.

      Overrides:
      streamClosed in class io.grpc.StreamTracer
    • filterContext

      public io.grpc.Context filterContext(io.grpc.Context context)
      Overrides:
      filterContext in class io.grpc.ServerStreamTracer
    • outboundMessageSent

      public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Overrides:
      outboundMessageSent in class io.grpc.StreamTracer
    • inboundMessageRead

      public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize)
      Overrides:
      inboundMessageRead in class io.grpc.StreamTracer
    • inboundMessage

      public void inboundMessage(int seqNo)
      Overrides:
      inboundMessage in class io.grpc.StreamTracer
    • inboundUncompressedSize

      public void inboundUncompressedSize(long bytes)
      Overrides:
      inboundUncompressedSize in class io.grpc.StreamTracer