Class BlobTransferOtelStats
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.voidrecordRequestCount(int version, VeniceBlobTransferSource source, VeniceResponseStatusCategory status) Records an attempted blob transfer, attributed to the source that served it.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.voidrecordVersionTopicFallback(int version, VeniceBlobTransferFallbackReason reason) Records that a replica fell back to version-topic bootstrapping instead of blob transfer.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. -
recordRequestCount
public void recordRequestCount(int version, VeniceBlobTransferSource source, VeniceResponseStatusCategory status) Records an attempted blob transfer, attributed to the source that served it.Only transfers that were actually attempted are counted; hosts filtered out by the pre-transfer connectability check never reach this method.
-
recordVersionTopicFallback
Records that a replica fell back to version-topic bootstrapping instead of blob transfer. -
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
-