Class StreamsMetricsImpl
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.metrics.StreamsMetricsImpl
-
- All Implemented Interfaces:
StreamsMetrics
public class StreamsMetricsImpl extends Object implements StreamsMetrics
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StreamsMetricsImpl.Version
-
Field Summary
-
Constructor Summary
Constructors Constructor Description StreamsMetricsImpl(org.apache.kafka.common.metrics.Metrics metrics, String clientId, String builtInMetricsVersion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
addAvgAndMaxLatencyToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation)
static void
addAvgAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfAvg, String descriptionOfMax)
static void
addAvgAndMinAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfAvg, String descriptionOfMin, String descriptionOfMax)
static void
addAvgAndSumMetricsToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String metricNamePrefix, String descriptionOfAvg, String descriptionOfTotal)
<T> void
addClientLevelImmutableMetric(String name, String description, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, T value)
<T> void
addClientLevelMutableMetric(String name, String description, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Gauge<T> valueProvider)
static void
addInvocationRateAndCountToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation)
static void
addInvocationRateAndCountToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate, String descriptionOfCount)
static void
addInvocationRateToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate)
org.apache.kafka.common.metrics.Sensor
addLatencyAndThroughputSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Deprecated.org.apache.kafka.common.metrics.Sensor
addLatencyRateTotalSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Add a latency, rate and total sensor for a specific operation, which will include the following metrics: average latency max latency invocation rate (num.operations / seconds) total invocation count Whenever a user records this sensor viaSensor.record(double)
etc, it will be counted as one invocation of the operation, and hence the rate / count metrics will be updated accordingly; and the recorded latency value will be used to update the average / max latency as well.static void
addMinAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfMin, String descriptionOfMax)
static void
addRateOfSumAndSumMetricsToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate, String descriptionOfTotal)
static void
addRateOfSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String description)
org.apache.kafka.common.metrics.Sensor
addRateTotalSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Add a rate and a total sensor for a specific operation, which will include the following metrics: invocation rate (num.operations / time unit) total invocation count Whenever a user records this sensor viaSensor.record(double)
etc, it will be counted as one invocation of the operation, and hence the rate / count metrics will be updated accordingly.org.apache.kafka.common.metrics.Sensor
addSensor(String name, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel)
Generic method to create a sensor.org.apache.kafka.common.metrics.Sensor
addSensor(String name, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Generic method to create a sensor with parent sensors.static void
addSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, boolean withSuffix, String description)
static void
addSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String description)
org.apache.kafka.common.metrics.Sensor
addThroughputSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Deprecated.static void
addValueMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String name, String description)
Map<String,String>
bufferLevelTagMap(String threadId, String taskName, String bufferName)
org.apache.kafka.common.metrics.Sensor
cacheLevelSensor(String threadId, String taskName, String storeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Map<String,String>
cacheLevelTagMap(String threadId, String taskId, String storeName)
Map<String,String>
clientLevelTagMap()
static void
maybeMeasureLatency(Runnable actionToMeasure, org.apache.kafka.common.utils.Time time, org.apache.kafka.common.metrics.Sensor sensor)
static <T> T
maybeMeasureLatency(Supplier<T> actionToMeasure, org.apache.kafka.common.utils.Time time, org.apache.kafka.common.metrics.Sensor sensor)
Map<MetricName,? extends Metric>
metrics()
Get read-only handle on global metrics registry.org.apache.kafka.common.metrics.Sensor
nodeLevelSensor(String threadId, String taskId, String processorNodeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Map<String,String>
nodeLevelTagMap(String threadId, String taskName, String processorNodeName)
void
recordLatency(org.apache.kafka.common.metrics.Sensor sensor, long startNs, long endNs)
Deprecated.void
recordThroughput(org.apache.kafka.common.metrics.Sensor sensor, long value)
Deprecated.void
removeAllCacheLevelSensors(String threadId, String taskId, String cacheName)
void
removeAllClientLevelMetrics()
void
removeAllNodeLevelSensors(String threadId, String taskId, String processorNodeName)
void
removeAllStoreLevelSensors(String threadId, String taskId, String storeName)
void
removeAllTaskLevelSensors(String threadId, String taskId)
void
removeAllThreadLevelSensors(String threadId)
void
removeSensor(org.apache.kafka.common.metrics.Sensor sensor)
Deletes a sensor and its parents, if anyRocksDBMetricsRecordingTrigger
rocksDBMetricsRecordingTrigger()
void
setRocksDBMetricsRecordingTrigger(RocksDBMetricsRecordingTrigger rocksDBMetricsRecordingTrigger)
org.apache.kafka.common.metrics.Sensor
storeLevelSensor(String threadId, String taskId, String storeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Map<String,String>
storeLevelTagMap(String threadId, String taskName, String storeType, String storeName)
org.apache.kafka.common.metrics.Sensor
taskLevelSensor(String threadId, String taskId, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Map<String,String>
taskLevelTagMap(String threadId, String taskId)
org.apache.kafka.common.metrics.Sensor
threadLevelSensor(String threadId, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Map<String,String>
threadLevelTagMap(String threadId)
StreamsMetricsImpl.Version
version()
-
-
-
Field Detail
-
CLIENT_ID_TAG
public static final String CLIENT_ID_TAG
- See Also:
- Constant Field Values
-
THREAD_ID_TAG
public static final String THREAD_ID_TAG
- See Also:
- Constant Field Values
-
THREAD_ID_TAG_0100_TO_24
public static final String THREAD_ID_TAG_0100_TO_24
- See Also:
- Constant Field Values
-
TASK_ID_TAG
public static final String TASK_ID_TAG
- See Also:
- Constant Field Values
-
PROCESSOR_NODE_ID_TAG
public static final String PROCESSOR_NODE_ID_TAG
- See Also:
- Constant Field Values
-
STORE_ID_TAG
public static final String STORE_ID_TAG
- See Also:
- Constant Field Values
-
BUFFER_ID_TAG
public static final String BUFFER_ID_TAG
- See Also:
- Constant Field Values
-
RECORD_CACHE_ID_TAG
public static final String RECORD_CACHE_ID_TAG
- See Also:
- Constant Field Values
-
ROLLUP_VALUE
public static final String ROLLUP_VALUE
- See Also:
- Constant Field Values
-
LATENCY_SUFFIX
public static final String LATENCY_SUFFIX
- See Also:
- Constant Field Values
-
RECORDS_SUFFIX
public static final String RECORDS_SUFFIX
- See Also:
- Constant Field Values
-
AVG_SUFFIX
public static final String AVG_SUFFIX
- See Also:
- Constant Field Values
-
MAX_SUFFIX
public static final String MAX_SUFFIX
- See Also:
- Constant Field Values
-
MIN_SUFFIX
public static final String MIN_SUFFIX
- See Also:
- Constant Field Values
-
RATE_SUFFIX
public static final String RATE_SUFFIX
- See Also:
- Constant Field Values
-
TOTAL_SUFFIX
public static final String TOTAL_SUFFIX
- See Also:
- Constant Field Values
-
RATIO_SUFFIX
public static final String RATIO_SUFFIX
- See Also:
- Constant Field Values
-
P99_SUFFIX
public static final String P99_SUFFIX
- See Also:
- Constant Field Values
-
P90_SUFFIX
public static final String P90_SUFFIX
- See Also:
- Constant Field Values
-
GROUP_PREFIX_WO_DELIMITER
public static final String GROUP_PREFIX_WO_DELIMITER
- See Also:
- Constant Field Values
-
GROUP_PREFIX
public static final String GROUP_PREFIX
- See Also:
- Constant Field Values
-
GROUP_SUFFIX
public static final String GROUP_SUFFIX
- See Also:
- Constant Field Values
-
CLIENT_LEVEL_GROUP
public static final String CLIENT_LEVEL_GROUP
- See Also:
- Constant Field Values
-
THREAD_LEVEL_GROUP
public static final String THREAD_LEVEL_GROUP
- See Also:
- Constant Field Values
-
THREAD_LEVEL_GROUP_0100_TO_24
public static final String THREAD_LEVEL_GROUP_0100_TO_24
- See Also:
- Constant Field Values
-
TASK_LEVEL_GROUP
public static final String TASK_LEVEL_GROUP
- See Also:
- Constant Field Values
-
PROCESSOR_NODE_LEVEL_GROUP
public static final String PROCESSOR_NODE_LEVEL_GROUP
- See Also:
- Constant Field Values
-
STATE_STORE_LEVEL_GROUP
public static final String STATE_STORE_LEVEL_GROUP
- See Also:
- Constant Field Values
-
BUFFER_LEVEL_GROUP_0100_TO_24
public static final String BUFFER_LEVEL_GROUP_0100_TO_24
- See Also:
- Constant Field Values
-
CACHE_LEVEL_GROUP
public static final String CACHE_LEVEL_GROUP
- See Also:
- Constant Field Values
-
OPERATIONS
public static final String OPERATIONS
- See Also:
- Constant Field Values
-
TOTAL_DESCRIPTION
public static final String TOTAL_DESCRIPTION
- See Also:
- Constant Field Values
-
RATE_DESCRIPTION
public static final String RATE_DESCRIPTION
- See Also:
- Constant Field Values
-
AVG_LATENCY_DESCRIPTION
public static final String AVG_LATENCY_DESCRIPTION
- See Also:
- Constant Field Values
-
MAX_LATENCY_DESCRIPTION
public static final String MAX_LATENCY_DESCRIPTION
- See Also:
- Constant Field Values
-
RATE_DESCRIPTION_PREFIX
public static final String RATE_DESCRIPTION_PREFIX
- See Also:
- Constant Field Values
-
RATE_DESCRIPTION_SUFFIX
public static final String RATE_DESCRIPTION_SUFFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
version
public StreamsMetricsImpl.Version version()
-
setRocksDBMetricsRecordingTrigger
public void setRocksDBMetricsRecordingTrigger(RocksDBMetricsRecordingTrigger rocksDBMetricsRecordingTrigger)
-
rocksDBMetricsRecordingTrigger
public RocksDBMetricsRecordingTrigger rocksDBMetricsRecordingTrigger()
-
addClientLevelImmutableMetric
public <T> void addClientLevelImmutableMetric(String name, String description, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, T value)
-
addClientLevelMutableMetric
public <T> void addClientLevelMutableMetric(String name, String description, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Gauge<T> valueProvider)
-
threadLevelSensor
public final org.apache.kafka.common.metrics.Sensor threadLevelSensor(String threadId, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
-
removeAllClientLevelMetrics
public final void removeAllClientLevelMetrics()
-
removeAllThreadLevelSensors
public final void removeAllThreadLevelSensors(String threadId)
-
nodeLevelTagMap
public Map<String,String> nodeLevelTagMap(String threadId, String taskName, String processorNodeName)
-
storeLevelTagMap
public Map<String,String> storeLevelTagMap(String threadId, String taskName, String storeType, String storeName)
-
bufferLevelTagMap
public Map<String,String> bufferLevelTagMap(String threadId, String taskName, String bufferName)
-
taskLevelSensor
public final org.apache.kafka.common.metrics.Sensor taskLevelSensor(String threadId, String taskId, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
-
removeAllTaskLevelSensors
public final void removeAllTaskLevelSensors(String threadId, String taskId)
-
nodeLevelSensor
public org.apache.kafka.common.metrics.Sensor nodeLevelSensor(String threadId, String taskId, String processorNodeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
-
removeAllNodeLevelSensors
public final void removeAllNodeLevelSensors(String threadId, String taskId, String processorNodeName)
-
cacheLevelSensor
public org.apache.kafka.common.metrics.Sensor cacheLevelSensor(String threadId, String taskName, String storeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
-
cacheLevelTagMap
public Map<String,String> cacheLevelTagMap(String threadId, String taskId, String storeName)
-
removeAllCacheLevelSensors
public final void removeAllCacheLevelSensors(String threadId, String taskId, String cacheName)
-
storeLevelSensor
public final org.apache.kafka.common.metrics.Sensor storeLevelSensor(String threadId, String taskId, String storeName, String sensorName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
-
removeAllStoreLevelSensors
public final void removeAllStoreLevelSensors(String threadId, String taskId, String storeName)
-
addSensor
public org.apache.kafka.common.metrics.Sensor addSensor(String name, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel)
Description copied from interface:StreamsMetrics
Generic method to create a sensor. Note that for most cases it is advisable to useaddRateTotalSensor()
oraddLatencyRateTotalSensor()
to ensure metric name well-formedness and conformity with the rest of the Kafka Streams code base. However, if the above two methods are not sufficient, this method can also be used.- Specified by:
addSensor
in interfaceStreamsMetrics
- Parameters:
name
- name of the sensor.recordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor- Returns:
- The added sensor.
- See Also:
StreamsMetrics.addRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.addLatencyRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.removeSensor(Sensor)
-
addSensor
public org.apache.kafka.common.metrics.Sensor addSensor(String name, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, org.apache.kafka.common.metrics.Sensor... parents)
Description copied from interface:StreamsMetrics
Generic method to create a sensor with parent sensors. Note that for most cases it is advisable to useaddRateTotalSensor()
oraddLatencyRateTotalSensor()
to ensure metric name well-formedness and conformity with the rest of the Kafka Streams code base. However, if the above two methods are not sufficient, this method can also be used.- Specified by:
addSensor
in interfaceStreamsMetrics
- Parameters:
name
- name of the sensorrecordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor- Returns:
- The added sensor.
- See Also:
StreamsMetrics.addRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.addLatencyRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.removeSensor(Sensor)
-
metrics
public Map<MetricName,? extends Metric> metrics()
Description copied from interface:StreamsMetrics
Get read-only handle on global metrics registry.- Specified by:
metrics
in interfaceStreamsMetrics
- Returns:
- Map of all metrics.
-
recordLatency
@Deprecated public void recordLatency(org.apache.kafka.common.metrics.Sensor sensor, long startNs, long endNs)
Deprecated.Description copied from interface:StreamsMetrics
Record the given latency value of the sensor. If the passed sensor includes throughput metrics, e.g., when created by theStreamsMetrics.addLatencyAndThroughputSensor(String, String, String, Sensor.RecordingLevel, String...)
method, then the throughput metrics will also be recorded from this event.- Specified by:
recordLatency
in interfaceStreamsMetrics
- Parameters:
sensor
- sensor whose latency we are recording.startNs
- start of measurement time in nanoseconds.endNs
- end of measurement time in nanoseconds.
-
recordThroughput
@Deprecated public void recordThroughput(org.apache.kafka.common.metrics.Sensor sensor, long value)
Deprecated.Description copied from interface:StreamsMetrics
Record the throughput value of a sensor.- Specified by:
recordThroughput
in interfaceStreamsMetrics
- Parameters:
sensor
- add Sensor whose throughput we are recordingvalue
- throughput value
-
addLatencyRateTotalSensor
public org.apache.kafka.common.metrics.Sensor addLatencyRateTotalSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Description copied from interface:StreamsMetrics
Add a latency, rate and total sensor for a specific operation, which will include the following metrics:- average latency
- max latency
- invocation rate (num.operations / seconds)
- total invocation count
Sensor.record(double)
etc, it will be counted as one invocation of the operation, and hence the rate / count metrics will be updated accordingly; and the recorded latency value will be used to update the average / max latency as well. Note that you can add more metrics to this sensor after you created it, which can then be updated uponSensor.record(double)
calls. The added sensor and its metrics can be removed withremoveSensor()
.- Specified by:
addLatencyRateTotalSensor
in interfaceStreamsMetrics
- Parameters:
scopeName
- name of the scope, which will be used as part of the metric type, e.g.: "stream-[scope]-metrics".entityName
- name of the entity, which will be used as part of the metric tags, e.g.: "[scope]-id" = "[entity]".operationName
- name of the operation, which will be used as the name of the metric, e.g.: "[operation]-latency-avg".recordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor.tags
- additional tags of the sensor- Returns:
- The added sensor.
- See Also:
StreamsMetrics.addRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.removeSensor(Sensor)
,StreamsMetrics.addSensor(String, Sensor.RecordingLevel, Sensor...)
-
addRateTotalSensor
public org.apache.kafka.common.metrics.Sensor addRateTotalSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Description copied from interface:StreamsMetrics
Add a rate and a total sensor for a specific operation, which will include the following metrics:- invocation rate (num.operations / time unit)
- total invocation count
Sensor.record(double)
etc, it will be counted as one invocation of the operation, and hence the rate / count metrics will be updated accordingly. Note that you can add more metrics to this sensor after you created it, which can then be updated uponSensor.record(double)
calls. The added sensor and its metrics can be removed withremoveSensor()
.- Specified by:
addRateTotalSensor
in interfaceStreamsMetrics
- Parameters:
scopeName
- name of the scope, which will be used as part of the metrics type, e.g.: "stream-[scope]-metrics".entityName
- name of the entity, which will be used as part of the metric tags, e.g.: "[scope]-id" = "[entity]".operationName
- name of the operation, which will be used as the name of the metric, e.g.: "[operation]-total".recordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor.tags
- additional tags of the sensor- Returns:
- The added sensor.
- See Also:
StreamsMetrics.addLatencyRateTotalSensor(String, String, String, Sensor.RecordingLevel, String...)
,StreamsMetrics.removeSensor(Sensor)
,StreamsMetrics.addSensor(String, Sensor.RecordingLevel, Sensor...)
-
addLatencyAndThroughputSensor
@Deprecated public org.apache.kafka.common.metrics.Sensor addLatencyAndThroughputSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Deprecated.Description copied from interface:StreamsMetrics
Add a latency and throughput sensor for a specific operation, which will include the following sensors:- average latency
- max latency
- throughput (num.operations / time unit)
- Specified by:
addLatencyAndThroughputSensor
in interfaceStreamsMetrics
- Parameters:
scopeName
- name of the scope, could be the type of the state store, etc.entityName
- name of the entity, could be the name of the state store instance, etc.operationName
- name of the operation, could be get / put / delete / etc.recordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor.tags
- additional tags of the sensor- Returns:
- The added sensor.
- Throws:
IllegalArgumentException
- if tags is not constructed in key-value pairs
-
addThroughputSensor
@Deprecated public org.apache.kafka.common.metrics.Sensor addThroughputSensor(String scopeName, String entityName, String operationName, org.apache.kafka.common.metrics.Sensor.RecordingLevel recordingLevel, String... tags)
Deprecated.Description copied from interface:StreamsMetrics
Add a throughput sensor for a specific operation:- throughput (num.operations / time unit)
StreamsMetrics.addLatencyAndThroughputSensor(String, String, String, Sensor.RecordingLevel, String...)
.- Specified by:
addThroughputSensor
in interfaceStreamsMetrics
- Parameters:
scopeName
- name of the scope, could be the type of the state store, etc.entityName
- name of the entity, could be the name of the state store instance, etc.operationName
- name of the operation, could be get / put / delete / etc.recordingLevel
- the recording level (e.g., INFO or DEBUG) for this sensor.tags
- additional tags of the sensor- Returns:
- The added sensor.
- Throws:
IllegalArgumentException
- if tags is not constructed in key-value pairs
-
addAvgAndMaxToSensor
public static void addAvgAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfAvg, String descriptionOfMax)
-
addMinAndMaxToSensor
public static void addMinAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfMin, String descriptionOfMax)
-
addAvgAndMaxLatencyToSensor
public static void addAvgAndMaxLatencyToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation)
-
addAvgAndMinAndMaxToSensor
public static void addAvgAndMinAndMaxToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfAvg, String descriptionOfMin, String descriptionOfMax)
-
addInvocationRateAndCountToSensor
public static void addInvocationRateAndCountToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate, String descriptionOfCount)
-
addInvocationRateToSensor
public static void addInvocationRateToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate)
-
addInvocationRateAndCountToSensor
public static void addInvocationRateAndCountToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation)
-
addRateOfSumAndSumMetricsToSensor
public static void addRateOfSumAndSumMetricsToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String descriptionOfRate, String descriptionOfTotal)
-
addRateOfSumMetricToSensor
public static void addRateOfSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String description)
-
addSumMetricToSensor
public static void addSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, String description)
-
addSumMetricToSensor
public static void addSumMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String operation, boolean withSuffix, String description)
-
addValueMetricToSensor
public static void addValueMetricToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String name, String description)
-
addAvgAndSumMetricsToSensor
public static void addAvgAndSumMetricsToSensor(org.apache.kafka.common.metrics.Sensor sensor, String group, Map<String,String> tags, String metricNamePrefix, String descriptionOfAvg, String descriptionOfTotal)
-
maybeMeasureLatency
public static void maybeMeasureLatency(Runnable actionToMeasure, org.apache.kafka.common.utils.Time time, org.apache.kafka.common.metrics.Sensor sensor)
-
maybeMeasureLatency
public static <T> T maybeMeasureLatency(Supplier<T> actionToMeasure, org.apache.kafka.common.utils.Time time, org.apache.kafka.common.metrics.Sensor sensor)
-
removeSensor
public void removeSensor(org.apache.kafka.common.metrics.Sensor sensor)
Deletes a sensor and its parents, if any- Specified by:
removeSensor
in interfaceStreamsMetrics
- Parameters:
sensor
- sensor to be removed
-
-