Class NoOpIngestionOtelStats
java.lang.Object
com.linkedin.davinci.stats.ingestion.IngestionOtelStats
com.linkedin.davinci.stats.ingestion.NoOpIngestionOtelStats
A no-op implementation of
IngestionOtelStats that discards all recording calls.
Used when ingestion OTel stats are disabled via config so that all recording call sites in
AggVersionedIngestionStats stay as simple unconditional calls
instead of being wrapped in null checks. This is a readability/maintainability choice, not a
performance one — JIT would optimize null checks equally well via constant-folding of the
final boolean guard in getIngestionOtelStats().-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NoOpIngestionOtelStatsSingleton instance — safe to share since all methods are stateless no-ops. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Cleans up all per-version state for this store.booleanvoidrecordBatchProcessingRequestCount(int version, long value) voidrecordBatchProcessingRequestErrorCount(int version, long value) voidrecordBatchProcessingRequestRecordCount(int version, long value) voidrecordBatchProcessingRequestTime(int version, double latencyMs) voidrecordBytesConsumed(int version, ReplicaType replicaType, long value) voidrecordBytesProduced(int version, ReplicaType replicaType, long value) voidrecordDcrEventCount(int version, VeniceDCREvent event, long value) voidrecordDcrTotalCount(int version, long value) voidrecordDuplicateKeyUpdateCount(int version, long value) voidrecordIdleTime(int version, long idleTimeMs) voidrecordIngestionTime(int version, double latencyMs) voidrecordPreprocessingInternalTime(int version, double latencyMs) voidrecordPreprocessingLeaderTime(int version, double latencyMs) voidrecordProducerCallbackTime(int version, ReplicaType replicaType, double latencyMs) voidrecordProducerTime(int version, double latencyMs) voidrecordRecordsConsumed(int version, ReplicaType replicaType, long value) voidrecordRecordsProduced(int version, ReplicaType replicaType, long value) voidrecordSubscribePrepTime(int version, double latencyMs) voidrecordTimeBetweenComponents(int version, VeniceIngestionSourceComponent sourceComponent, VeniceIngestionDestinationComponent destComponent, double latencyMs) voidremoveIngestionTask(int version) Removes the StoreIngestionTask and associated per-version state for a specific version.voidsetIngestionTask(int version, StoreIngestionTask task) Sets the StoreIngestionTask for a specific version.voidsetIngestionTaskPushTimeoutGauge(int version, int value) voidupdateVersionInfo(int currentVersion, int futureVersion)
-
Field Details
-
INSTANCE
Singleton instance — safe to share since all methods are stateless no-ops.
-
-
Method Details
-
setIngestionTask
Description copied from class:IngestionOtelStatsSets the StoreIngestionTask for a specific version. This enables async gauge metrics to access task data.- Overrides:
setIngestionTaskin classIngestionOtelStats
-
removeIngestionTask
public void removeIngestionTask(int version) Description copied from class:IngestionOtelStatsRemoves the StoreIngestionTask and associated per-version state for a specific version.- Overrides:
removeIngestionTaskin classIngestionOtelStats
-
close
public void close()Description copied from class:IngestionOtelStatsCleans up all per-version state for this store. Call this when the store is being deleted.Note: OTel instruments (counters, histograms, async gauges) are NOT deregistered here. OpenTelemetry SDK does not support deregistering individual instruments from a Meter. The instruments will remain registered but will report zero/stale values until the MeterProvider is shut down.
- Overrides:
closein classIngestionOtelStats
-
setIngestionTaskPushTimeoutGauge
public void setIngestionTaskPushTimeoutGauge(int version, int value) - Overrides:
setIngestionTaskPushTimeoutGaugein classIngestionOtelStats
-
recordIdleTime
public void recordIdleTime(int version, long idleTimeMs) - Overrides:
recordIdleTimein classIngestionOtelStats
-
emitOtelMetrics
public boolean emitOtelMetrics()- Overrides:
emitOtelMetricsin classIngestionOtelStats
-
updateVersionInfo
public void updateVersionInfo(int currentVersion, int futureVersion) - Overrides:
updateVersionInfoin classIngestionOtelStats
-
recordSubscribePrepTime
public void recordSubscribePrepTime(int version, double latencyMs) - Overrides:
recordSubscribePrepTimein classIngestionOtelStats
-
recordIngestionTime
public void recordIngestionTime(int version, double latencyMs) - Overrides:
recordIngestionTimein classIngestionOtelStats
-
recordPreprocessingLeaderTime
public void recordPreprocessingLeaderTime(int version, double latencyMs) - Overrides:
recordPreprocessingLeaderTimein classIngestionOtelStats
-
recordPreprocessingInternalTime
public void recordPreprocessingInternalTime(int version, double latencyMs) - Overrides:
recordPreprocessingInternalTimein classIngestionOtelStats
-
recordProducerTime
public void recordProducerTime(int version, double latencyMs) - Overrides:
recordProducerTimein classIngestionOtelStats
-
recordBatchProcessingRequestCount
public void recordBatchProcessingRequestCount(int version, long value) - Overrides:
recordBatchProcessingRequestCountin classIngestionOtelStats
-
recordBatchProcessingRequestRecordCount
public void recordBatchProcessingRequestRecordCount(int version, long value) - Overrides:
recordBatchProcessingRequestRecordCountin classIngestionOtelStats
-
recordBatchProcessingRequestErrorCount
public void recordBatchProcessingRequestErrorCount(int version, long value) - Overrides:
recordBatchProcessingRequestErrorCountin classIngestionOtelStats
-
recordBatchProcessingRequestTime
public void recordBatchProcessingRequestTime(int version, double latencyMs) - Overrides:
recordBatchProcessingRequestTimein classIngestionOtelStats
-
recordDcrTotalCount
public void recordDcrTotalCount(int version, long value) - Overrides:
recordDcrTotalCountin classIngestionOtelStats
-
recordDuplicateKeyUpdateCount
public void recordDuplicateKeyUpdateCount(int version, long value) - Overrides:
recordDuplicateKeyUpdateCountin classIngestionOtelStats
-
recordRecordsConsumed
- Overrides:
recordRecordsConsumedin classIngestionOtelStats
-
recordRecordsProduced
- Overrides:
recordRecordsProducedin classIngestionOtelStats
-
recordBytesConsumed
- Overrides:
recordBytesConsumedin classIngestionOtelStats
-
recordBytesProduced
- Overrides:
recordBytesProducedin classIngestionOtelStats
-
recordProducerCallbackTime
- Overrides:
recordProducerCallbackTimein classIngestionOtelStats
-
recordDcrEventCount
- Overrides:
recordDcrEventCountin classIngestionOtelStats
-
recordTimeBetweenComponents
public void recordTimeBetweenComponents(int version, VeniceIngestionSourceComponent sourceComponent, VeniceIngestionDestinationComponent destComponent, double latencyMs) - Overrides:
recordTimeBetweenComponentsin classIngestionOtelStats
-