Skip to content

fix(observability): document real outcome vocabulary, add graphrunner lifecycle metrics (audit #11) - #259

Open
sbalabanov wants to merge 2 commits into
mainfrom
audit/fix-11-metrics-doc-and-lifecycle
Open

fix(observability): document real outcome vocabulary, add graphrunner lifecycle metrics (audit #11)#259
sbalabanov wants to merge 2 commits into
mainfrom
audit/fix-11-metrics-doc-and-lifecycle

Conversation

@sbalabanov

@sbalabanov sbalabanov commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Align observability documentation and instrumentation with Tango's actual result vocabulary and shared lifecycle metric pattern.

Intent

Ensure metrics consumers see the real result values (success, cancelled, user, infra, and infra_retryable), add missing graph-runner lifecycle and graph-cache lookup instrumentation, and keep controller failures on the same standard finish histogram used by other components.

Changes

  • Document the real outcome vocabulary derived from ErrorCode.String().
  • Describe the generic RecordCacheLookup hit/miss pattern without cataloging current call sites.
  • Add Begin/Complete lifecycle metrics to nativeGraphRunner.Compute with a repo-tagged scope.
  • Record controller graph-download cache lookups.
  • Remove the controller-specific failures{error_code} counter in favor of the standard finish{result=...} histogram.
  • Fix the stale CamelCase operation-name comment in observability/metrics/names.go.

Test Plan

  • go test ./controller/...
  • go test ./graphrunner/...
  • go test ./observability/metrics/... ./orchestrator/...
  • make gazelle
  • aifx validate --base origin/main --timeout 15 --overall-timeout 20 --no-cache

Revert Plan

Revert the commits from this PR to restore the prior documentation and instrumentation behavior.

Jira Issues

None.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread graphrunner/native_test.go Outdated
Comment thread docs/observability/metrics.md Outdated
Comment thread controller/gettargetgraph_test.go Outdated
Comment thread docs/observability/metrics.md Outdated
sbalabanov-zz and others added 2 commits July 31, 2026 20:59
… lifecycle metrics (audit #11)

The metrics doc described outcome values (success/failure/cancelled) that
did not match the code, which emits success/cancelled/user/infra/infra_retryable
via ErrorCode.String(). "failure" was never emitted. The doc also showed a
fictitious cache_read sub-op example and omitted the failures{error_code}
counter and three cache-lookup counters.

- Rewrite the outcome-vocabulary section with the real values and their
  derivation from ErrorCode.String()
- Document the controller failures{error_code} counter
- Document the three cache-lookup counters (treehash, graph, compared_targets)
  with hit/miss/silent-on-infra semantics
- Replace the fictitious cache_read example with the real cache-lookup pattern
- Fix stale CamelCase op-name comment in names.go (real ops are snake_case)
- Add Begin/Complete lifecycle metrics to nativeGraphRunner.Compute with
  repo-tagged emitter
- Add RecordCacheLookup graph_cache_lookup to the controller graph download
  path with correct hit/miss/silent-infra semantics
- Add tests for graphrunner lifecycle metrics (success + error) and controller
  graph_cache_lookup counters (hit + miss)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sbalabanov
sbalabanov force-pushed the audit/fix-11-metrics-doc-and-lifecycle branch from aeefa21 to 7721e00 Compare July 31, 2026 21:17
@sbalabanov
sbalabanov marked this pull request as ready for review July 31, 2026 21:19
@sbalabanov
sbalabanov requested review from a team as code owners July 31, 2026 21:19
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.

4 participants