* AAP-91428 | feat: subsystem metrics for indirect node counting
Expose Prometheus metrics for indirect node counting at
/api/v2/metrics?subsystemonly=1, following the existing DispatcherMetrics
pattern. This is a prerequisite for perf/scale testing (AAP-57413) before
the feature flag can be removed for GA in 2.7.
Metrics added:
- indirect_node_audit_records_created (counter)
- indirect_node_query_execution_seconds (accumulated float)
- indirect_node_jq_query_errors (counter)
- indirect_node_fallback_cleanup_seconds (latest-value float)
Instrumentation points in host_indirect.py:
- jq query execution timing and error counting in build_indirect_host_data
- audit record count after bulk_create in save_indirect_host_entries_of_job
- fallback cleanup job wall-clock timing
Also registers IndirectCountingMetrics in send_subsystem_metrics for
cross-node metric broadcasting.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* AAP-91428 | fix: SonarQube complaints (coverage + complexity)
* AAP-91428 | fix: use jq_str and fix docstring
* AAP-91428 | test: tests to get coverage up
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>