Class HeartbeatOtelStats

java.lang.Object
com.linkedin.davinci.stats.ingestion.heartbeat.HeartbeatOtelStats

public class HeartbeatOtelStats extends Object
OpenTelemetry metrics for heartbeat monitoring. Note: Tehuti metrics are managed separately in HeartbeatStatReporter.
  • Field Details

  • Constructor Details

    • HeartbeatOtelStats

      public HeartbeatOtelStats(io.tehuti.metrics.MetricsRepository metricsRepository, String storeName, String clusterName)
  • 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 version
      futureVersion - The future/upcoming version
    • recordHeartbeatDelayOtelMetrics

      public void recordHeartbeatDelayOtelMetrics(int version, String region, ReplicaType replicaType, ReplicaState replicaState, long delayMs)
      Records a heartbeat delay with all dimensional attributes to OTel metrics. Returns early if OTel metrics are disabled or version is invalid.
      Parameters:
      version - The version number
      region - The region name
      replicaType - The replica type ReplicaType
      replicaState - The replica state ReplicaState
      delayMs - The delay in milliseconds
    • getVersionInfo

      public com.linkedin.davinci.stats.ingestion.heartbeat.HeartbeatOtelStats.VersionInfo getVersionInfo()