public class DatadogHttpReporter extends Object implements MetricReporter, Scheduled
Variables in metrics scope will be sent to Datadog as tags.
Modifier and Type | Field and Description |
---|---|
static String |
API_KEY |
static String |
TAGS |
Constructor and Description |
---|
DatadogHttpReporter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this reporter.
|
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.
|
public static final String API_KEY
public static final String TAGS
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 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
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.