public class PartitionSensors extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARTITION_TAG |
static String |
TOPIC_TAG |
Constructor and Description |
---|
PartitionSensors(TenantMetrics.MetricsRequestContext context,
org.apache.kafka.common.metrics.Metrics metrics,
PartitionSensorBuilder sensorBuilder) |
Modifier and Type | Method and Description |
---|---|
void |
recordStatsIn(org.apache.kafka.common.TopicPartition tp,
long bytes,
long numRecords,
long timeMs) |
void |
recordStatsOut(org.apache.kafka.common.TopicPartition tp,
long bytes,
long numRecords,
long timeMs) |
public static final String TOPIC_TAG
public static final String PARTITION_TAG
public PartitionSensors(TenantMetrics.MetricsRequestContext context, org.apache.kafka.common.metrics.Metrics metrics, PartitionSensorBuilder sensorBuilder)
public void recordStatsIn(org.apache.kafka.common.TopicPartition tp, long bytes, long numRecords, long timeMs)
timeMs
- The current POSIX time in millisecondspublic void recordStatsOut(org.apache.kafka.common.TopicPartition tp, long bytes, long numRecords, long timeMs)