Class HeartbeatOtelStats
java.lang.Object
com.linkedin.davinci.stats.ingestion.heartbeat.HeartbeatOtelStats
OpenTelemetry metrics for heartbeat monitoring.
Note: Tehuti metrics are managed separately in
HeartbeatStatReporter.-
Constructor Summary
ConstructorsConstructorDescriptionHeartbeatOtelStats(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.voidrecordHeartbeatDelayOtelMetrics(int version, String region, ReplicaType replicaType, ReplicaState replicaState, VeniceStoreWriteType writeType, VeniceChunkingStatus chunkingStatus, VeniceRegionLocality locality, long delayMs) Records a heartbeat delay with all dimensional attributes to OTel metrics.voidupdateVersionInfo(int currentVersion, int futureVersion) Updates the current and future version for this store.
-
Constructor Details
-
HeartbeatOtelStats
-
-
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
-
recordHeartbeatDelayOtelMetrics
public void recordHeartbeatDelayOtelMetrics(int version, String region, ReplicaType replicaType, ReplicaState replicaState, VeniceStoreWriteType writeType, VeniceChunkingStatus chunkingStatus, VeniceRegionLocality locality, long delayMs) Records a heartbeat delay with all dimensional attributes to OTel metrics. Returns early if OTel metrics are disabled.- Parameters:
version- The version numberregion- The region namereplicaType- The replica typeReplicaTypereplicaState- The replica stateReplicaStatewriteType- Pre-resolved store write-type label (REGULAR / WRITE_COMPUTE)chunkingStatus- Pre-resolved version-level chunking label (CHUNKED / UNCHUNKED)locality- Pre-resolved locality label (LOCAL / REMOTE) — applied to the per-region metric state on first call per region; subsequent calls reuse the cached state. Null is coerced to REMOTE: from the perspective of an unconfigured server, every source region is "not the local region".delayMs- 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.
-