public class RichGaugeExporter extends AbstractMetricExporter
RichGauge
data to a metric-based back end. Each gauge
measurement is stored as a set of related metrics with a common prefix (the name of the
gauge), and suffixes that describe the data. For example, a gauge called foo
is
stored as . If the
MetricWriter
provided is a MultiMetricRepository
then the values for a
gauge will be stored as a group, and hence will be retrievable from the repository in a
single query (or optionally individually).Constructor and Description |
---|
RichGaugeExporter(RichGaugeReader reader,
PrefixMetricWriter writer) |
RichGaugeExporter(RichGaugeReader reader,
PrefixMetricWriter writer,
String prefix) |
Modifier and Type | Method and Description |
---|---|
protected Iterable<String> |
groups()
Generate a group of metrics to iterate over in the form of a set of Strings (e.g.
|
protected Iterable<Metric<?>> |
next(String group)
Get the next group of metrics to write.
|
protected void |
write(String group,
Collection<Metric<?>> values)
Write the values associated with a group.
|
export, flush, setEarliestTimestamp, setIgnoreTimestamps, setSendLatest
public RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer)
public RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer, String prefix)
protected Iterable<Metric<?>> next(String group)
AbstractMetricExporter
next
in class AbstractMetricExporter
group
- the group name to writeprotected Iterable<String> groups()
AbstractMetricExporter
groups
in class AbstractMetricExporter
protected void write(String group, Collection<Metric<?>> values)
AbstractMetricExporter
write
in class AbstractMetricExporter
group
- the group to writevalues
- the values to writeCopyright © 2015 Pivotal Software, Inc.. All rights reserved.