public interface MetricsRegistry
Metric
s and
have those metrics wired to specific metrics systems, such as JMX, provided by MetricsReporter
s.
Those implementing Samza jobs use the MetricsRegistry to register metrics, which then handle
the details of getting those metrics to each defined MetricsReporter.
Users are free to define their metrics into groups as needed for their jobs. MetricsReporter
s
will likely use the group field to group the user-defined metrics together.Modifier and Type | Method and Description |
---|---|
Counter |
newCounter(java.lang.String group,
Counter counter)
Register existing
Counter with this registry |
Counter |
newCounter(java.lang.String group,
java.lang.String name)
Create and register a new
Counter |
<T> Gauge<T> |
newGauge(java.lang.String group,
Gauge<T> value)
Register an existing
Gauge |
<T> Gauge<T> |
newGauge(java.lang.String group,
java.lang.String name,
T value)
Create and register a new
Gauge |
Timer |
newTimer(java.lang.String group,
java.lang.String name)
Create and Register a new
Timer |
Timer |
newTimer(java.lang.String group,
Timer timer)
Register existing
Timer with this registry |
Counter newCounter(java.lang.String group, java.lang.String name)
Counter
group
- Group for this Countername
- Name of to-be-created CounterCounter newCounter(java.lang.String group, Counter counter)
Counter
with this registrygroup
- Group for this Countercounter
- Existing Counter to register<T> Gauge<T> newGauge(java.lang.String group, java.lang.String name, T value)
Gauge
T
- Type the Gauge will be wrappinggroup
- Group for this Gaugename
- Name of to-be-created Gaugevalue
- Initial value for the Gauge<T> Gauge<T> newGauge(java.lang.String group, Gauge<T> value)
Gauge
T
- Type the Gauge will be wrappinggroup
- Group for this Gaugevalue
- Initial value for the GaugeTimer newTimer(java.lang.String group, java.lang.String name)
Timer
group
- Group for this Timername
- Name of to-be-created Timer