Skip to content

fix(vindex): expose policy origins and instrument observability metrics - #190

Merged
mhutchinson merged 1 commit into
transparency-dev:mainfrom
mhutchinson:vindex/policy-metrics
Nov 12, 2026
Merged

mhutchinson merged 1 commit into
transparency-dev:mainfrom
mhutchinson:vindex/policy-metrics

Conversation

@mhutchinson

Copy link
Copy Markdown
Contributor

Summary

Follow-up polish to #179 and #183 enabling zero-flag origin inference and wiring remaining Prometheus metrics across upper-stack components:

  • vindex/internal/wire: Add Origin() string on single-log builtPolicy and parsedPolicy implementations plus wire.PolicyOrigin(p any) string (returning "" for multi-log policies unless explicitly overridden), keeping wire.Policy as a 1-method Verify([]byte) interface.
  • vindex/internal/metrics: Add vindex_auditor_halted gauge (AuditorHalted, SetAuditorHalted, ResetAuditorHalted) and set it on root mismatch.
  • vindex/internal/mpt: Instrument vindex_mpt_lock_wait_seconds in lockTreeWrite and vindex_mpt_mmap_bytes in updateDiskBytesMetric.
  • vindex/internal/tree: Instrument vindex_witness_wait_seconds when witness cosignatures are configured, and guard uint64 -> int64 MPT version conversion in OutputPublisher.PublishKeyBatch.

- Add Origin() methods on builtPolicy/parsedPolicy and wire.PolicyOrigin helper so single-log C2SP policies auto-populate expected origins.
- Add AuditorHalted Prometheus gauge and instrument MPTLockWaitSeconds, MPTMMapBytes, and WitnessWaitSeconds.
@mhutchinson
mhutchinson requested a review from patflynn November 12, 2026 11:37
@mhutchinson
mhutchinson merged commit 96b771f into transparency-dev:main Nov 12, 2026
12 checks passed
@mhutchinson
mhutchinson deleted the vindex/policy-metrics branch November 12, 2026 16:30
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.

2 participants