Package com.linkedin.davinci.stats
Class BlobTransferOtelStats
java.lang.Object
com.linkedin.davinci.stats.BlobTransferOtelStats
OpenTelemetry metrics for blob transfer statistics.
This is a versioned OTel stats class — each instance is per-store. A volatile VersionInfo
field tracks the current and future version numbers so recording methods can classify the version
being recorded as CURRENT, FUTURE, or BACKUP.
Note: Tehuti metrics are managed separately in BlobTransferStats and
BlobTransferStatsReporter. This class handles only OTel metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionBlobTransferOtelStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName) Constructs a BlobTransferOtelStats instance for a specific store. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidrecordBytesReceived(int version, long bytes) Records bytes received via blob transfer.voidrecordBytesSent(int version, long bytes) Records bytes sent via blob transfer.voidrecordResponseCount(int version, VeniceResponseStatusCategory status) Records a blob transfer response count with SUCCESS or FAIL status.voidrecordTime(int version, double timeInSec) Records blob transfer time in seconds.voidupdateVersionInfo(int currentVersion, int futureVersion)
-
Constructor Details
-
BlobTransferOtelStats
public BlobTransferOtelStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName) Constructs a BlobTransferOtelStats instance for a specific store.OTel emission is determined solely by the global OTel flag in the
VeniceMetricsRepository. A plainMetricsRepositorydisables OTel emission.- Parameters:
metricsRepository- the metrics repositorystoreName- the name of the Venice storeclusterName- the Venice cluster name
-
-
Method Details
-
emitOtelMetrics
public boolean emitOtelMetrics() -
updateVersionInfo
public void updateVersionInfo(int currentVersion, int futureVersion) -
recordResponseCount
Records a blob transfer response count with SUCCESS or FAIL status.Consolidates the 3 Tehuti sensors (total/success/fail) into 1 OTel COUNTER with a
VeniceResponseStatusCategorydimension. The total is the sum of SUCCESS and FAIL in OTel, so there is no separate total recording. -
recordTime
public void recordTime(int version, double timeInSec) Records blob transfer time in seconds.- Parameters:
version- the store versiontimeInSec- the blob transfer time in seconds
-
recordBytesReceived
public void recordBytesReceived(int version, long bytes) Records bytes received via blob transfer.- Parameters:
version- the store versionbytes- the number of bytes received
-
recordBytesSent
public void recordBytesSent(int version, long bytes) Records bytes sent via blob transfer.- Parameters:
version- the store versionbytes- the number of bytes sent
-