public class Slf4jReporter extends AbstractReporter implements Scheduled
counters, gauges, histograms, log, meters
NO_OP_FILTER
Constructor and Description |
---|
Slf4jReporter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this reporter.
|
String |
filterCharacters(String input)
Filter the given string and generate a resulting string from it.
|
void |
open(MetricConfig metricConfig)
Configures this reporter.
|
void |
report()
Report the current measurements.
|
notifyOfAddedMetric, notifyOfRemovedMetric
public void open(MetricConfig metricConfig)
MetricReporter
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.
open
in interface MetricReporter
metricConfig
- A properties object that contains all parameters set for this reporter.public void close()
MetricReporter
close
in interface MetricReporter
public void report()
Scheduled
public String filterCharacters(String input)
CharacterFilter
For example, one implementation could filter out invalid characters from the input string.
filterCharacters
in interface CharacterFilter
input
- Input stringCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.