@PublicEvolving public abstract class ScheduledDropwizardReporter extends Object implements MetricReporter, Scheduled, com.codahale.metrics.Reporter, CharacterFilter
MetricReporter
that wraps a
Dropwizard Reporter
.Modifier and Type | Field and Description |
---|---|
static String |
ARG_CONVERSION_DURATION |
static String |
ARG_CONVERSION_RATE |
static String |
ARG_HOST |
static String |
ARG_PORT |
static String |
ARG_PREFIX |
protected org.slf4j.Logger |
log |
protected com.codahale.metrics.MetricRegistry |
registry |
protected com.codahale.metrics.ScheduledReporter |
reporter |
Modifier | Constructor and Description |
---|---|
protected |
ScheduledDropwizardReporter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this reporter.
|
String |
filterCharacters(String metricName)
Filter the given string and generate a resulting string from it.
|
abstract com.codahale.metrics.ScheduledReporter |
getReporter(MetricConfig config) |
void |
notifyOfAddedMetric(Metric metric,
String metricName,
MetricGroup group)
Called when a new
Metric was added. |
void |
notifyOfRemovedMetric(Metric metric,
String metricName,
MetricGroup group)
Called when a
Metric was should be removed. |
void |
open(MetricConfig config)
Configures this reporter.
|
void |
report()
Report the current measurements.
|
protected final org.slf4j.Logger log
public static final String ARG_HOST
public static final String ARG_PORT
public static final String ARG_PREFIX
public static final String ARG_CONVERSION_RATE
public static final String ARG_CONVERSION_DURATION
protected final com.codahale.metrics.MetricRegistry registry
protected com.codahale.metrics.ScheduledReporter reporter
public void open(MetricConfig config)
MetricReporter
This method is always called first on a newly instantiated reporter.
open
in interface MetricReporter
config
- A properties object that contains all parameters set for this reporter.public void close()
MetricReporter
close
in interface MetricReporter
public void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group)
MetricReporter
Metric
was added.notifyOfAddedMetric
in interface MetricReporter
metric
- the metric that was addedmetricName
- the name of the metricgroup
- the group that contains the metricpublic void notifyOfRemovedMetric(Metric metric, String metricName, MetricGroup group)
MetricReporter
Metric
was should be removed.notifyOfRemovedMetric
in interface MetricReporter
metric
- the metric that should be removedmetricName
- the name of the metricgroup
- the group that contains the metricpublic String filterCharacters(String metricName)
CharacterFilter
For example, one implementation could filter out invalid characters from the input string.
filterCharacters
in interface CharacterFilter
metricName
- Input stringpublic void report()
Scheduled
public abstract com.codahale.metrics.ScheduledReporter getReporter(MetricConfig config)
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.