Class RecordLevelDelayOtelStats
java.lang.Object
com.linkedin.davinci.stats.ingestion.heartbeat.RecordLevelDelayOtelStats
OpenTelemetry metrics for record-level delay monitoring.
Tracks delays for regular data records (not heartbeat control messages).
Note: Tehuti metrics are managed separately in
HeartbeatStatReporter.-
Constructor Summary
ConstructorsConstructorDescriptionRecordLevelDelayOtelStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Clears the per-region metric state map, releasing references to MetricEntityState objects.booleanReturns true if OTel metrics are emitted.voidrecordRecordDelayOtelMetrics(int version, String region, ReplicaType replicaType, ReplicaState replicaState, long delayMs) Records a record-level delay with all dimensional attributes to OTel metrics.voidupdateVersionInfo(int currentVersion, int futureVersion) Updates the current and future version for this store.
-
Constructor Details
-
RecordLevelDelayOtelStats
-
-
Method Details
-
emitOtelMetrics
public boolean emitOtelMetrics()Returns true if OTel metrics are emitted. -
updateVersionInfo
public void updateVersionInfo(int currentVersion, int futureVersion) Updates the current and future version for this store.- Parameters:
currentVersion- The current serving versionfutureVersion- The future/upcoming version
-
recordRecordDelayOtelMetrics
public void recordRecordDelayOtelMetrics(int version, String region, ReplicaType replicaType, ReplicaState replicaState, long delayMs) Records a record-level delay with all dimensional attributes to OTel metrics. Returns early if OTel metrics are disabled or version is invalid.- Parameters:
version- The version numberregion- The region namereplicaType- The replica typeReplicaTypereplicaState- The replica stateReplicaStatedelayMs- The delay in milliseconds
-
getVersionInfo
-
close
public void close()Clears the per-region metric state map, releasing references to MetricEntityState objects. Does not deregister OTel instruments from the metrics repository — they will be cleaned up when the Meter/MeterProvider is closed or the SDK shuts down.
-