public class DropwizardMetricConsumer extends Object implements MetricConsumer
MetricConsumer
that accepts metric data from
MetricCollectingClient
or
MetricCollectingService
and stores it
into the MetricRegistry
. Only for internal use.Constructor and Description |
---|
DropwizardMetricConsumer(String prefix,
String serviceName,
com.codahale.metrics.MetricRegistry metricRegistry)
Creates a new instance that decorates the specified
ServiceCodec . |
Modifier and Type | Method and Description |
---|---|
void |
invocationComplete(Scheme scheme,
int code,
long processTimeNanos,
int requestSize,
int responseSize,
String hostname,
String path,
Optional<String> method)
Invoked for each request that has been processed
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
public DropwizardMetricConsumer(String prefix, String serviceName, com.codahale.metrics.MetricRegistry metricRegistry)
ServiceCodec
.public void invocationComplete(Scheme scheme, int code, long processTimeNanos, int requestSize, int responseSize, String hostname, String path, Optional<String> method)
MetricConsumer
invocationComplete
in interface MetricConsumer
scheme
- the Scheme
which the invocation has been performed on.code
- the SessionProtocol
-specific status code that signifies the result of the
invocation. e.g. HTTP response status codeprocessTimeNanos
- elapsed nano time processing requestrequestSize
- number of bytes in request if possible, otherwise it will be 0responseSize
- number of bytes in response if possible, otherwise it will be 0Copyright © 2015-2016 LINE Corporation. All Rights Reserved.