Skip to content

Report terminal iteration outcomes in logs and Prometheus - #486

Open
THardy98 wants to merge 3 commits into
fix/graceful-driver-failurefrom
feat/iteration-outcome-observability
Open

Report terminal iteration outcomes in logs and Prometheus#486
THardy98 wants to merge 3 commits into
fix/graceful-driver-failurefrom
feat/iteration-outcome-observability

Conversation

@THardy98

@THardy98 THardy98 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

What was changed

The load driver extends PR #461's basic degraded-run warning with structured terminal iteration failures and an aggregate attempted, succeeded, failed, success-rate, failure-rate, and successful-throughput summary. It also exports omes_iterations_total with bounded scenario, outcome, and normalized status_code labels.

The local Prometheus handler orders tag names and values deterministically because cached metric vectors bind label values positionally. Metrics record one terminal outcome per logical iteration after retries finish; iterations abandoned by cancellation are omitted. Full wrapped errors remain in logs rather than metric labels.

This is the top layer of native stack #487 and depends on PR #461. Review PR #461 first for the iteration-tolerance behavior, then this PR for observability.

Why?

When operators opt into continuing after terminal iteration failures, they need explicit visibility into degraded runs. Structured logs retain actionable errors, while the bounded Prometheus dimensions support aggregation without introducing unbounded cardinality.

Checklist

  1. Closes: N/A. This is the observability follow-up to PR Allow CLI load runs to continue after terminal iteration failures #461.

  2. How was this tested:

    • Metrics-handler tests verify deterministic tag ordering.
    • Loadgen tests cover status classification, retry-aware logical-outcome counting, successful and failed outcomes, and cancellation exclusion.
    • Focused race-detector coverage passes.
    • Focused cmd/omes, loadgen, metrics, and race-detector tests pass locally on the rebased stack.
    • All 46 GitHub Actions checks pass on the revised head.
  3. Any docs updates needed?

    • Updated docs/running.md with the aggregate summary and Prometheus metric contract.

@THardy98
THardy98 added this pull request to stack #487 September 11, 2026 14:02
@THardy98 THardy98 changed the title feat/iteration outcome observability Report terminal iteration outcomes in logs and Prometheus Sep 11, 2026
@THardy98
THardy98 marked this pull request as ready for review September 11, 2026 14:48
@THardy98
THardy98 requested review from a team as code owners September 11, 2026 14:48
Prometheus vectors bind label values positionally. The upcoming iteration outcome metric reuses one cached vector across tagged handlers, so nondeterministic Go map iteration can attach values to the wrong labels.

Sort merged tag keys before deriving the value slice to keep the label schema stable.
Report attempted, succeeded, and failed logical iterations with rates and achieved successful throughput when a run reaches its configured end.

Keep this operational reporting separate from the CLI failure-tolerance policy.
Expose terminal logical-iteration outcomes through omes_iterations_total with bounded scenario, outcome, and normalized status_code labels. Record once after retries finish and omit cancellation-abandoned iterations.

Keep full terminal errors in structured logs while the metric labels remain aggregation-safe.
@THardy98
THardy98 force-pushed the feat/iteration-outcome-observability branch from a7c7c28 to 2e8c45b Compare September 11, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant