java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.DbClientMetrics
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.OperationListener

public final class DbClientMetrics extends Object implements io.opentelemetry.instrumentation.api.instrumenter.OperationListener
OperationListener which keeps track of Database client metrics.
Since:
2.11.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.opentelemetry.instrumentation.api.instrumenter.OperationMetrics
    get()
    Returns an OperationMetrics instance which can be used to enable recording of DbClientMetrics.
    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 an OperationMetrics instance which can be used to enable recording of DbClientMetrics.
      See Also:
      • InstrumenterBuilder.addOperationMetrics(OperationMetrics)
    • 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