public interface MetricsRegistry
MetricsRegistry metricsRegistry = teaAgent.getMetricsRegistry(); Counter counter = metricsRegistry.createGauge(HelloWorld.SERVER, "server1", "request-count", "Requests");
Modifier and Type | Method and Description |
---|---|
Counter |
createCounter(MetricIdentifier counterIdentifier)
Creates an instance of a
Counter using the specified metric identifier. |
Counter |
createCounter(String objectType,
String objectKey,
String counterName,
String counterDesc)
Creates an instance of a
Counter . |
Counter |
createCounter(String objectType,
String objectKey,
String counterName,
String counterDesc,
String metricUnit)
Creates an instance of a
Counter . |
Gauge |
createGauge(MetricIdentifier gaugeIdentifier,
GaugeValueProvider<?> gaugeValueProvider) |
Gauge |
createGauge(String objectType,
String objectKey,
String gaugeName,
String gaugeDesc,
GaugeValueProvider<?> gaugeValueProvider)
Creates an instance of a
Gauge . |
Gauge |
createGauge(String objectType,
String objectKey,
String gaugeName,
String gaugeDesc,
String metricUnit,
GaugeValueProvider<?> gaugeValueProvider)
Creates an instance of a
Gauge . |
Meter |
createMeter(MetricIdentifier meterIdentifier,
TimeUnit rateUnit)
Creates an instance of a
Meter using the specified metric identifier. |
Meter |
createMeter(String objectType,
String objectKey,
String meterName,
String meterDesc,
String metricUnit,
TimeUnit rateUnit)
Creates an instance of a
Meter . |
Meter |
createMeter(String objectType,
String objectKey,
String meterName,
String meterDesc,
TimeUnit rateUnit)
Creates an instance of a
Meter . |
Timer |
createTimer(MetricIdentifier timerIdentifier,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates an instance of a
Timer using the specified metric identifier. |
Timer |
createTimer(String objectType,
String objectKey,
String timerName,
String timerDesc,
String metricUnit,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates an instance of a
Timer . |
Timer |
createTimer(String objectType,
String objectKey,
String timerName,
String timerDesc,
TimeUnit durationUnit,
TimeUnit rateUnit)
Creates an instance of a
Timer . |
Metric |
getMetric(MetricIdentifier metricIdentifier)
Return the metric identified by the metricIdentifier
|
Metric |
unregisterMetric(MetricIdentifier metricIdentifier)
Remove the metric from the metrics registry.
|
Counter createCounter(String objectType, String objectKey, String counterName, String counterDesc)
Counter
. The MetricIdentifier
for the counter is created using the objectType, objectKey, counterName
and counterDesc parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancecounterName
- name of the countercounterDesc
- description of the counterCounter createCounter(String objectType, String objectKey, String counterName, String counterDesc, String metricUnit)
Counter
. The MetricIdentifier
for the counter is created using the objectType, objectKey, counterName,
counterDesc and metricUnit parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancecounterName
- name of the countercounterDesc
- description of the countermetricUnit
- Unit specifying what the counter is measuring. e.g. when measuring JVM memory, unit could be kilobytes.Counter createCounter(MetricIdentifier counterIdentifier)
Counter
using the specified metric identifier.counterIdentifier
- identifier for the counterMeter createMeter(String objectType, String objectKey, String meterName, String meterDesc, TimeUnit rateUnit)
Meter
. The MetricIdentifier
for the meter is created using the objectType, objectKey, meterName and
meterDesc parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancemeterName
- name of the metermeterDesc
- description of the meterrateUnit
- time unit for calculating the rate of eventsMeter createMeter(String objectType, String objectKey, String meterName, String meterDesc, String metricUnit, TimeUnit rateUnit)
Meter
. The MetricIdentifier
for the meter is created using the objectType, objectKey, meterName and
meterDesc parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancemeterName
- name of the metermeterDesc
- description of the metermetricUnit
- Unit specifying what the meter is measuring. e.g. Requests/second.rateUnit
- time unit for calculating the rate of eventsMeter createMeter(MetricIdentifier meterIdentifier, TimeUnit rateUnit)
Meter
using the specified metric identifier.meterIdentifier
- identifier for the meterrateUnit
- time unit for calculating the rate of eventsTimer createTimer(String objectType, String objectKey, String timerName, String timerDesc, TimeUnit durationUnit, TimeUnit rateUnit)
Timer
. The MetricIdentifier
for the meter is created using the objectType, objectKey, timerName,
timerDesc and metricUnit parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancetimerName
- name of the timertimerDesc
- description of the timerdurationUnit
- time unit for calculating the duration of the eventsrateUnit
- time unit for calculating the rate of eventsTimer createTimer(String objectType, String objectKey, String timerName, String timerDesc, String metricUnit, TimeUnit durationUnit, TimeUnit rateUnit)
Timer
. The MetricIdentifier
for the meter is created using the objectType, objectKey, timerName,
timerDesc and metricUnit parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancetimerName
- name of the timertimerDesc
- description of the timermetricUnit
- Unit specifying what the timer is measuring. e.g. Requests.durationUnit
- time unit for calculating the duration of the eventsrateUnit
- time unit for calculating the rate of eventsTimer createTimer(MetricIdentifier timerIdentifier, TimeUnit durationUnit, TimeUnit rateUnit)
Timer
using the specified metric identifier.timerIdentifier
- identifier for the timerdurationUnit
- time unit for calculating the duration of the eventsrateUnit
- time unit for calculating the rate of eventsGauge createGauge(String objectType, String objectKey, String gaugeName, String gaugeDesc, GaugeValueProvider<?> gaugeValueProvider)
Gauge
. The MetricIdentifier
for the gauge is created using the objectType, objectKey, gaugeName,
gaugeDesc and metricUnit parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancegaugeName
- name of the gaugegaugeDesc
- description of the gaugegaugeValueProvider
- implementation of GaugeValueProvider
that would be used for retrieving the valueGauge createGauge(String objectType, String objectKey, String gaugeName, String gaugeDesc, String metricUnit, GaugeValueProvider<?> gaugeValueProvider)
Gauge
. The MetricIdentifier
for the gauge is created using the objectType, objectKey, gaugeName,
gaugeDesc and metricUnit parameters.objectType
- name of the TeaObjectType
for the object instanceobjectKey
- key for identifying the object instancegaugeName
- name of the timergaugeDesc
- description of the timermetricUnit
- Unit specifying what the timer is measuring. e.g. kilobytes.gaugeValueProvider
- implementation of GaugeValueProvider
that would be used for retrieving the valueGauge createGauge(MetricIdentifier gaugeIdentifier, GaugeValueProvider<?> gaugeValueProvider)
gaugeIdentifier
- identifier for the gaugegaugeValueProvider
- implementation of GaugeValueProvider
that would be used for retrieving the valueMetric unregisterMetric(MetricIdentifier metricIdentifier)
metricIdentifier
- identifier for the metricMetric getMetric(MetricIdentifier metricIdentifier)
metricIdentifier
- identifier for the metricCopyright © 2014 Cloud Software Group, Inc.. All Rights Reserved.