Package com.linkedin.venice.stats
Class AbstractVeniceStats
- java.lang.Object
-
- com.linkedin.venice.stats.AbstractVeniceStats
-
- Direct Known Subclasses:
AbstractVeniceHttpStats
,AbstractVeniceStatsReporter
,AdminConsumptionStats
,AdminOperationsStats
,BackupVersionOptimizationServiceStats
,BasicConsumerStats
,ClusterStats
,DisabledPartitionStats
,DiskHealthStats
,DnsLookupStats
,ErrorPartitionStats
,HealthCheckStats
,HeartbeatBasedCheckerStats
,HelixGroupStats
,HelixMessageChannelStats
,HostHealthStats
,HostLevelIngestionStats
,HttpConnectionPoolStats
,IsolatedIngestionProcessHeartbeatStats
,IsolatedIngestionProcessStats
,KafkaConsumerServiceStats
,LeakedResourceCleanerStats
,MetadataUpdateStats
,NativeMetadataRepositoryStats
,ParticipantStoreConsumptionStats
,PartitionHealthStats
,PushHealthStats
,PushJobStatusStats
,PushStatusCleanUpStats
,RetryManagerStats
,RocksDBMemoryStats
,RocksDBStats
,RouterCurrentVersionStats
,RouterThrottleStats
,SecurityStats
,ServerConnectionStats
,ServerMetadataServiceStats
,ServerReadQuotaUsageStats
,SparkServerStats
,StaleVersionStats
,StoreBackendStats
,StoreBackupVersionCleanupServiceStats
,StoreBufferServiceStats
,StoreCacheStats
,StoreStats
,StuckConsumerRepairStats
,SystemStoreHealthCheckStats
,ThreadPoolStats
,TopicCleanupServiceStats
,VeniceAdminStats
,VeniceJVMStats
,VeniceLockStats
,VeniceProducerMetrics
,VeniceVersionedStatsReporter
,VeniceWriterStats
,ZkClientStatusStats
public class AbstractVeniceStats extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELIMITER
-
Constructor Summary
Constructors Constructor Description AbstractVeniceStats(io.tehuti.metrics.MetricsRepository metricsRepository, java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.tehuti.metrics.MeasurableStat[]
avgAndMax()
protected io.tehuti.metrics.MeasurableStat[]
avgAndTotal()
io.tehuti.metrics.MetricsRepository
getMetricsRepository()
java.lang.String
getName()
protected java.lang.String
getSensorFullName(java.lang.String sensorName)
static java.lang.String
getSensorFullName(java.lang.String resourceName, java.lang.String sensorName)
protected boolean
isTotalStats()
protected io.tehuti.metrics.MeasurableStat[]
minAndMax()
protected LongAdderRateGauge
registerOnlyTotalRate(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<LongAdderRateGauge> totalSensor, Time time)
Only register sensor for total stats.protected io.tehuti.metrics.Sensor
registerOnlyTotalSensor(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<io.tehuti.metrics.Sensor> totalSensor, io.tehuti.metrics.MeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerPerStoreAndTotalSensor(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<io.tehuti.metrics.Sensor> totalSensor, io.tehuti.metrics.MeasurableStat... stats)
Register sensor for both total and per store stats.protected io.tehuti.metrics.Sensor
registerSensor(io.tehuti.metrics.NamedMeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerSensor(java.lang.String sensorName, io.tehuti.metrics.MeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerSensor(java.lang.String sensorFullName, io.tehuti.metrics.MetricConfig config, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
N.B.: This function is private because it requires the full sensor name, which should be generated fromgetSensorFullName(String)
, and is therefore less user-friendly for developers of subclasses.protected io.tehuti.metrics.Sensor
registerSensor(java.lang.String sensorName, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
protected void
registerSensorAttributeGauge(java.lang.String sensorName, java.lang.String attributeName, io.tehuti.metrics.stats.AsyncGauge stat)
protected io.tehuti.metrics.Sensor
registerSensorIfAbsent(io.tehuti.metrics.NamedMeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerSensorIfAbsent(java.lang.String sensorName, io.tehuti.metrics.MeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerSensorIfAbsent(java.lang.String resourceName, java.lang.String sensorName, io.tehuti.metrics.MetricConfig config, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
protected io.tehuti.metrics.Sensor
registerSensorWithAggregate(java.lang.String sensorName, io.tehuti.metrics.MetricConfig config, java.util.function.Supplier<io.tehuti.metrics.MeasurableStat[]> stats)
protected io.tehuti.metrics.Sensor
registerSensorWithAggregate(java.lang.String sensorName, java.util.function.Supplier<io.tehuti.metrics.MeasurableStat[]> stats)
protected void
unregisterAllSensors()
-
-
-
Field Detail
-
DELIMITER
public static final java.lang.String DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMetricsRepository
public io.tehuti.metrics.MetricsRepository getMetricsRepository()
-
isTotalStats
protected final boolean isTotalStats()
-
getName
public final java.lang.String getName()
-
registerSensor
protected io.tehuti.metrics.Sensor registerSensor(java.lang.String sensorName, io.tehuti.metrics.MeasurableStat... stats)
-
registerSensor
protected io.tehuti.metrics.Sensor registerSensor(io.tehuti.metrics.NamedMeasurableStat... stats)
-
registerSensorAttributeGauge
protected void registerSensorAttributeGauge(java.lang.String sensorName, java.lang.String attributeName, io.tehuti.metrics.stats.AsyncGauge stat)
-
registerSensor
protected io.tehuti.metrics.Sensor registerSensor(java.lang.String sensorName, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
-
registerSensor
protected io.tehuti.metrics.Sensor registerSensor(java.lang.String sensorFullName, io.tehuti.metrics.MetricConfig config, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
N.B.: This function is private because it requires the full sensor name, which should be generated fromgetSensorFullName(String)
, and is therefore less user-friendly for developers of subclasses. The other functions which call this one require just the partial sensor name, which is less error-prone.
-
unregisterAllSensors
protected void unregisterAllSensors()
-
registerSensorWithAggregate
protected io.tehuti.metrics.Sensor registerSensorWithAggregate(java.lang.String sensorName, java.util.function.Supplier<io.tehuti.metrics.MeasurableStat[]> stats)
-
registerSensorWithAggregate
protected io.tehuti.metrics.Sensor registerSensorWithAggregate(java.lang.String sensorName, io.tehuti.metrics.MetricConfig config, java.util.function.Supplier<io.tehuti.metrics.MeasurableStat[]> stats)
-
registerPerStoreAndTotalSensor
protected io.tehuti.metrics.Sensor registerPerStoreAndTotalSensor(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<io.tehuti.metrics.Sensor> totalSensor, io.tehuti.metrics.MeasurableStat... stats)
Register sensor for both total and per store stats. When per-store stats is recorded, the total stats would be recorded as well.- Parameters:
sensorName
-totalStats
-totalSensor
-stats
-- Returns:
-
registerOnlyTotalSensor
protected io.tehuti.metrics.Sensor registerOnlyTotalSensor(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<io.tehuti.metrics.Sensor> totalSensor, io.tehuti.metrics.MeasurableStat... stats)
-
registerOnlyTotalRate
protected LongAdderRateGauge registerOnlyTotalRate(java.lang.String sensorName, AbstractVeniceStats totalStats, java.util.function.Supplier<LongAdderRateGauge> totalSensor, Time time)
Only register sensor for total stats. If not provided, create a new one.- Parameters:
sensorName
-totalStats
-totalSensor
-time
-- Returns:
-
registerSensorIfAbsent
protected io.tehuti.metrics.Sensor registerSensorIfAbsent(java.lang.String sensorName, io.tehuti.metrics.MeasurableStat... stats)
-
registerSensorIfAbsent
protected io.tehuti.metrics.Sensor registerSensorIfAbsent(io.tehuti.metrics.NamedMeasurableStat... stats)
-
registerSensorIfAbsent
protected io.tehuti.metrics.Sensor registerSensorIfAbsent(java.lang.String resourceName, java.lang.String sensorName, io.tehuti.metrics.MetricConfig config, io.tehuti.metrics.Sensor[] parents, io.tehuti.metrics.MeasurableStat... stats)
-
getSensorFullName
protected java.lang.String getSensorFullName(java.lang.String sensorName)
-
getSensorFullName
public static java.lang.String getSensorFullName(java.lang.String resourceName, java.lang.String sensorName)
-
avgAndMax
protected final io.tehuti.metrics.MeasurableStat[] avgAndMax()
-
minAndMax
protected final io.tehuti.metrics.MeasurableStat[] minAndMax()
-
avgAndTotal
protected final io.tehuti.metrics.MeasurableStat[] avgAndTotal()
-
-