java.lang.Object
io.opentelemetry.instrumentation.api.instrumenter.rpc.RpcServerMetrics
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.OperationListener

public final class RpcServerMetrics extends Object implements io.opentelemetry.instrumentation.api.instrumenter.OperationListener
OperationListener which keeps track of RPC server metrics.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.opentelemetry.instrumentation.api.instrumenter.OperationMetrics
    get()
    Returns a OperationMetrics which can be used to enable recording of RpcServerMetrics on an InstrumenterBuilder.
    void
    onEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos)
     
    io.opentelemetry.context.Context
    onStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos)
     

    Methods inherited from class java.lang.Object

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

    • get

      public static io.opentelemetry.instrumentation.api.instrumenter.OperationMetrics get()
      Returns a OperationMetrics which can be used to enable recording of RpcServerMetrics on an InstrumenterBuilder.
    • onStart

      public io.opentelemetry.context.Context onStart(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes startAttributes, long startNanos)
      Specified by:
      onStart in interface io.opentelemetry.instrumentation.api.instrumenter.OperationListener
    • onEnd

      public void onEnd(io.opentelemetry.context.Context context, io.opentelemetry.api.common.Attributes endAttributes, long endNanos)
      Specified by:
      onEnd in interface io.opentelemetry.instrumentation.api.instrumenter.OperationListener