Class DropwizardMetricsContext
java.lang.Object
org.apache.cxf.metrics.dropwizard.DropwizardMetricsContext
- All Implemented Interfaces:
Closeable,AutoCloseable,MetricsContext
Dropwizard 5 Metrics Context
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected io.dropwizard.metrics5.Timerprotected io.dropwizard.metrics5.Meterprotected io.dropwizard.metrics5.Counterprotected io.dropwizard.metrics5.Timerprotected io.dropwizard.metrics5.Meterprotected final io.dropwizard.metrics5.MetricRegistryprotected io.dropwizard.metrics5.Timerprotected io.dropwizard.metrics5.Timerprotected io.dropwizard.metrics5.Timer -
Constructor Summary
ConstructorsConstructorDescriptionDropwizardMetricsContext(String prefix, io.dropwizard.metrics5.MetricRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()io.dropwizard.metrics5.Timerio.dropwizard.metrics5.Meterio.dropwizard.metrics5.Counterio.dropwizard.metrics5.Timerio.dropwizard.metrics5.Meterio.dropwizard.metrics5.MetricRegistryio.dropwizard.metrics5.Timerio.dropwizard.metrics5.Timerio.dropwizard.metrics5.Timervoidstart(org.apache.cxf.message.Exchange ex) Will be called at the start of invoke (or when added to a started MessageMetrics).voidstop(long timeInNS, long inSize, long outSize, org.apache.cxf.message.Exchange ex) Called when the invocation is complete.
-
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
-
registry
protected final io.dropwizard.metrics5.MetricRegistry registry
-
-
Constructor Details
-
DropwizardMetricsContext
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
start
public void start(org.apache.cxf.message.Exchange ex) Description copied from interface:MetricsContextWill 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:
startin interfaceMetricsContext
-
stop
public void stop(long timeInNS, long inSize, long outSize, org.apache.cxf.message.Exchange ex) Description copied from interface:MetricsContextCalled when the invocation is complete.- Specified by:
stopin interfaceMetricsContext- 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
-
getRegistry
public io.dropwizard.metrics5.MetricRegistry getRegistry()
-