Add bounded workflow label metrics dimensions - #1226
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughWorkflow task metrics now include curated workflow labels with bounded Prometheus attributes. Task queries return grouped counts. Tests cover aggregation, caching, disabled metrics, registration, and dashboard structure. Documentation describes label dimensions and validation metrics. ChangesWorkflow metrics
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
b463ab3 to
c300e64
Compare
5056561 to
fc3b5d2
Compare
fc3b5d2 to
f9f2198
Compare
f9f2198 to
328368a
Compare
328368a to
cb3b5ec
Compare
cb3b5ec to
709b4e9
Compare
709b4e9 to
d1b9fae
Compare
d1b9fae to
0cfa33a
Compare
77c1694 to
a8ba11c
Compare
|
📖 Docs preview: https://d3in15bfzp49i0.cloudfront.net/1226/index.html |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1226 +/- ##
==========================================
+ Coverage 66.76% 66.91% +0.14%
==========================================
Files 202 202
Lines 26050 26076 +26
Branches 3938 3942 +4
==========================================
+ Hits 17393 17448 +55
+ Misses 7917 7887 -30
- Partials 740 741 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
a8ba11c to
a4f2ef4
Compare
a4f2ef4 to
9f2e862
Compare
9f2e862 to
324664b
Compare
324664b to
fcf6b49
Compare
Add one prefixed attribute per curated policy key to osmo_tasks_count, clamped to the allow-list plus <missing>/<other> sentinels so series stay bounded in every enforcement mode. Fix the gauge's counting defect by selecting COUNT(*) instead of emitting presence rows. Pin the OSS Workflow Resources dashboard as deployment-neutral (no PPP binding) with a structural test; PPP panels ship via internal provisioning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop the unreachable JSON-text parsing branch (psycopg2 decodes JSONB to dicts), hoist loop-invariant attribute names, consolidate the triplicated patch scaffolding in the metrics tests, loosen change-detector assertions, and replace the dashboard title pinning with a deployment-neutrality scan. Re-home the osmo_tasks_count label-dimension reference docs from the CLI PR. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Correct the aggregation comment (clamping can collapse distinct rows today), explain the sentinel angle-bracket choice at both the code and docs sites, refresh the stale get_recent_tasks docstring, and note the Grafana schema quirk behind the query helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the NVIDIA-internal 'PPP' example key with the generic 'project' in the metrics test, dashboard-neutrality test, and the metrics docs, to match merged #1220. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
fcf6b49 to
f3bcad8
Compare
Summary
Issue - None
[OSMO-6501] Track B8 of the workflow-labels PR split.
osmo_tasks_countgains oneworkflow_label_<key>attribute per curated policy key (any enforcement mode), value-clamped to the allow-list plus<missing>/<other>sentinels so cardinality stays bounded at |allow_list|+2 per key.COUNT(*), so each series read 1; it now selects and sums real counts.-,.,/,_collision-free).workflow_resources_usage.jsondashboard stays free of any deployment-specific label dimension, pinned by a new structural test; label-specific dashboards are provisioned per deployment.osmo_label_validation_total{key,outcome}submit-gate counter landed with Enforce workflow label policy at submission #1223 (it is emitted inside the admission gate).Stacked on #1225 for chain simplicity; functionally depends only on the schema (#1219) and policy config (#1220).
Extracted from prototype #1194.
Testing
bazel test //src/service/core/workflow/tests:test_workflow_metrics(clamping matrix, sentinel values, attribute-name escaping, count aggregation, config-failure fallback)bazel test //src/service/core/workflow/tests:test_helpersbazel test //docs/deployment_guide/dashboards:test_dashboardsChecklist
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Tests