Class DropwizardMetricsContext

java.lang.Object
org.apache.cxf.metrics.dropwizard.DropwizardMetricsContext
All Implemented Interfaces:
Closeable, AutoCloseable, MetricsContext

public class DropwizardMetricsContext extends Object implements MetricsContext, Closeable
Dropwizard 5 Metrics Context
  • Field Details

    • inFlight

      protected io.dropwizard.metrics5.Counter inFlight
    • totals

      protected io.dropwizard.metrics5.Timer totals
    • uncheckedApplicationFaults

      protected io.dropwizard.metrics5.Timer uncheckedApplicationFaults
    • checkedApplicationFaults

      protected io.dropwizard.metrics5.Timer checkedApplicationFaults
    • runtimeFaults

      protected io.dropwizard.metrics5.Timer runtimeFaults
    • logicalRuntimeFaults

      protected io.dropwizard.metrics5.Timer logicalRuntimeFaults
    • incomingData

      protected io.dropwizard.metrics5.Meter incomingData
    • outgoingData

      protected io.dropwizard.metrics5.Meter outgoingData
    • baseName

      protected final String baseName
    • registry

      protected final io.dropwizard.metrics5.MetricRegistry registry
  • Constructor Details

    • DropwizardMetricsContext

      public DropwizardMetricsContext(String prefix, io.dropwizard.metrics5.MetricRegistry registry)
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • start

      public void start(org.apache.cxf.message.Exchange ex)
      Description copied from interface: MetricsContext
      Will be called at the start of invoke (or when added to a started MessageMetrics). This is when the metrics should increment "inFlight" counts and other stats. There is no need to record a "start time" as the invoke time will be passed into the stop method.
      Specified by:
      start in interface MetricsContext
    • stop

      public void stop(long timeInNS, long inSize, long outSize, org.apache.cxf.message.Exchange ex)
      Description copied from interface: MetricsContext
      Called when the invocation is complete.
      Specified by:
      stop in interface MetricsContext
      Parameters:
      timeInNS -
      inSize -
      outSize -
      ex -
    • getInFlight

      public io.dropwizard.metrics5.Counter getInFlight()
    • getTotals

      public io.dropwizard.metrics5.Timer getTotals()
    • getUncheckedApplicationFaults

      public io.dropwizard.metrics5.Timer getUncheckedApplicationFaults()
    • getCheckedApplicationFaults

      public io.dropwizard.metrics5.Timer getCheckedApplicationFaults()
    • getRuntimeFaults

      public io.dropwizard.metrics5.Timer getRuntimeFaults()
    • getLogicalRuntimeFaults

      public io.dropwizard.metrics5.Timer getLogicalRuntimeFaults()
    • getIncomingData

      public io.dropwizard.metrics5.Meter getIncomingData()
    • getOutgoingData

      public io.dropwizard.metrics5.Meter getOutgoingData()
    • getBaseName

      public String getBaseName()
    • getRegistry

      public io.dropwizard.metrics5.MetricRegistry getRegistry()