feat: sample recent business events

This commit is contained in:
2026-09-18 21:12:05 +08:00
parent 5284206731
commit 8ce9f4e1fa
14 changed files with 68 additions and 18 deletions

View File

@@ -123,6 +123,7 @@ func TestBusinessSnapshotKeepsLastGoodStateOnFailure(t *testing.T) {
DeliveryOldestAgeSeconds: 8.25,
WorkflowStates: map[string]uint64{"RUNNING": 1},
WorkflowOldestAgeSeconds: 4.75,
RecentEvents: map[string]uint64{"task.accepted": 5},
Truncated: true,
}, started, nil)
first := r.Render()
@@ -130,6 +131,7 @@ func TestBusinessSnapshotKeepsLastGoodStateOnFailure(t *testing.T) {
`orbit_pulse_tasks_state{state="WAITING"} 3`,
`orbit_result_deliveries_state{state="PENDING"} 2`,
`orbit_weave_workflows_state{state="RUNNING"} 1`,
`orbit_business_events_recent{event="task.accepted"} 5`,
"orbit_pulse_tasks_oldest_age_seconds 12.5",
"orbit_business_snapshot_truncated 1",
`orbit_business_snapshot_total{outcome="success"} 1`,