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 |
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