Package com.linkedin.venice.producer
Class VeniceProducerMetrics
java.lang.Object
com.linkedin.venice.stats.AbstractVeniceStats
com.linkedin.venice.producer.VeniceProducerMetrics
Metrics for Venice Producer operations.
Latency Metrics
- queue_wait_latency: Time waiting in worker queue (submit to worker start)
- preprocessing_latency: Worker start to preprocess end (serialization + schema lookup)
- produce_to_durable_buffer_latency: Preprocess end to broker ack
- caller_to_pubsub_producer_buffer_latency: Caller submit to PubSub producer buffer
- end_to_end_latency: Caller submit to future completion (full round-trip)
Operation Counters
- write_operation: Total write operations (put + delete + update)
- put_operation, delete_operation, update_operation: Per-type counters
- success_write_operation, failed_write_operation: Outcome counters
- pending_write_operation: Current in-flight operations (gauge)
Queue Size Gauges
- total_worker_queue_size: Sum of all worker queue depths
- callback_queue_size: Callback executor queue depth
-
Field Summary
Fields inherited from class com.linkedin.venice.stats.AbstractVeniceStats
DELIMITER -
Constructor Summary
ConstructorsConstructorDescriptionVeniceProducerMetrics(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName) -
Method Summary
Modifier and TypeMethodDescriptionvoidrecordCallerToPubSubBufferLatency(double latencyMs) Records the caller to PubSub producer buffer latency - the total time from caller submission to when the write is queued to the PubSub producer's buffer.voidvoidrecordEndToEndLatency(double latencyMs) Record the end-to-end latency (from submission to future completion).voidvoidrecordPreprocessingLatency(double latencyMs) voidvoidrecordQueueWaitLatency(double latencyMs) Records the queue wait latency - the time a task spent waiting in the worker queue before being picked up by a worker thread.voidrecordSuccessfulRequestWithLatency(double latencyMs) voidvoidCalled after executor is created to register queue size gauges.Methods inherited from class com.linkedin.venice.stats.AbstractVeniceStats
avgAndMax, avgAndTotal, getMetricFullName, getMetricsRepository, getName, getSensorFullName, getSensorFullName, isTotalStats, minAndMax, registerOnlyTotalRate, registerOnlyTotalSensor, registerPerStoreAndTotalSensor, registerSensor, registerSensor, registerSensor, registerSensor, registerSensorAttributeGauge, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorIfAbsent, registerSensorWithAggregate, registerSensorWithAggregate, unregisterAllSensors
-
Constructor Details
-
VeniceProducerMetrics
public VeniceProducerMetrics(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName)
-
-
Method Details
-
registerQueueMetrics
Called after executor is created to register queue size gauges.- Parameters:
executor- the partitioned producer executor
-
recordPutRequest
public void recordPutRequest() -
recordDeleteRequest
public void recordDeleteRequest() -
recordUpdateRequest
public void recordUpdateRequest() -
recordSuccessfulRequestWithLatency
public void recordSuccessfulRequestWithLatency(double latencyMs) -
recordFailedRequest
public void recordFailedRequest() -
recordPreprocessingLatency
public void recordPreprocessingLatency(double latencyMs) -
recordEndToEndLatency
public void recordEndToEndLatency(double latencyMs) Record the end-to-end latency (from submission to future completion).- Parameters:
latencyMs- end-to-end latency in milliseconds
-
recordQueueWaitLatency
public void recordQueueWaitLatency(double latencyMs) Records the queue wait latency - the time a task spent waiting in the worker queue before being picked up by a worker thread.- Parameters:
latencyMs- latency in milliseconds
-
recordCallerToPubSubBufferLatency
public void recordCallerToPubSubBufferLatency(double latencyMs) Records the caller to PubSub producer buffer latency - the total time from caller submission to when the write is queued to the PubSub producer's buffer. This includes queue wait time, preprocessing, and the synchronous time to submit to VeniceWriter.- Parameters:
latencyMs- latency in milliseconds (supports sub-millisecond precision as a double)
-