类 RichGaugeExporter
- java.lang.Object
- org.springframework.boot.actuate.metrics.export.AbstractMetricExporter
- org.springframework.boot.actuate.metrics.export.RichGaugeExporter
- 所有已实现的接口:
Closeable
,Flushable
,AutoCloseable
,Exporter
public class RichGaugeExporter extends AbstractMetricExporter
Exporter or converter forRichGauge
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 calledfoo
is stored as[foo.min, foo.max. foo.val, foo.count, foo.avg, foo.alpha]
. If theMetricWriter
provided is aMultiMetricRepository
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).- 从以下版本开始:
- 1.3.0
构造器概要
构造器 构造器 说明 RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer)
RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer, String prefix)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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.从类继承的方法 org.springframework.boot.actuate.metrics.export.AbstractMetricExporter
close, export, flush, setEarliestTimestamp, setIgnoreTimestamps, setSendLatest
构造器详细资料
RichGaugeExporter
public RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer)
RichGaugeExporter
public RichGaugeExporter(RichGaugeReader reader, PrefixMetricWriter writer, String prefix)
方法详细资料
next
protected Iterable<Metric<?>> next(String group)
从类复制的说明:AbstractMetricExporter
Get the next group of metrics to write.- 指定者:
next
在类中AbstractMetricExporter
- 参数:
group
- the group name to write- 返回:
- some metrics to write
groups
protected Iterable<String> groups()
从类复制的说明:AbstractMetricExporter
Generate a group of metrics to iterate over in the form of a set of Strings (e.g. prefixes). If the metrics to be exported partition into groups identified by a String, subclasses should override this method. Otherwise the default should be fine (iteration over all metrics).- 覆盖:
groups
在类中AbstractMetricExporter
- 返回:
- groups of metrics to iterate over (default singleton empty string)
write
protected void write(String group, Collection<Metric<?>> values)
从类复制的说明:AbstractMetricExporter
Write the values associated with a group.- 指定者:
write
在类中AbstractMetricExporter
- 参数:
group
- the group to writevalues
- the values to write