feat(jobs): expose last job failure time
JobActivity 记录最近失败时刻并进入快照;JobRunner 失败时上报该时刻;新增指标 msgx.pipeline.job.last_failure_age_seconds 与健康明细 lastFailureAgeSeconds(对齐 reference 作业健康口径)。 验证:./gradlew test 145 tests / 0 fail / 0 skipped。
This commit is contained in:
@@ -45,6 +45,7 @@ internal fun jobRunnerHealth(snapshot: JobActivity.Snapshot, now: Instant): Heal
|
||||
"started" to snapshot.started,
|
||||
"lastTickAgeSeconds" to (ageSeconds ?: -1L),
|
||||
"lastTickDurationMs" to snapshot.lastTickMillis,
|
||||
"lastFailureAgeSeconds" to (snapshot.lastFailureAt?.let { Duration.between(it, now).seconds } ?: -1L),
|
||||
"ticks" to snapshot.ticks,
|
||||
"failures" to snapshot.failures,
|
||||
"lastSweepSelected" to snapshot.lastSweepSelected,
|
||||
|
||||
Reference in New Issue
Block a user