Interface MetricReporter
-
- All Known Implementing Classes:
AbstractPrometheusReporter
,AbstractReporter
,DatadogHttpReporter
,GraphiteReporter
,InfluxdbReporter
,JMXReporter
,OpenTelemetryMetricReporter
,PrometheusPushGatewayReporter
,PrometheusReporter
,ScheduledDropwizardReporter
,Slf4jReporter
,StatsDReporter
@Public public interface MetricReporter
Metric reporters are used to exportMetrics
to an external backend.Metric reporters are instantiated via a
MetricReporterFactory
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes this reporter.void
notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group)
Called when a newMetric
was added.void
notifyOfRemovedMetric(Metric metric, String metricName, MetricGroup group)
Called when aMetric
was removed.void
open(MetricConfig config)
Configures this reporter.
-
-
-
Method Detail
-
open
void open(MetricConfig config)
Configures this reporter.If the reporter was instantiated generically and hence parameter-less, this method is the place where the reporter sets it's basic fields based on configuration values. Otherwise, this method will typically be a no-op since resources can be acquired in the constructor.
This method is always called first on a newly instantiated reporter.
- Parameters:
config
- A properties object that contains all parameters set for this reporter.
-
close
void close()
Closes this reporter. Should be used to close channels, streams and release resources.
-
notifyOfAddedMetric
void notifyOfAddedMetric(Metric metric, String metricName, MetricGroup group)
Called when a newMetric
was added.- Parameters:
metric
- the metric that was addedmetricName
- the name of the metricgroup
- the group that contains the metric
-
notifyOfRemovedMetric
void notifyOfRemovedMetric(Metric metric, String metricName, MetricGroup group)
Called when aMetric
was removed.- Parameters:
metric
- the metric that should be removedmetricName
- the name of the metricgroup
- the group that contains the metric
-
-