Expose UFFD pager stats as Prometheus metrics#297
Draft
jarugupj wants to merge 4 commits into
Draft
Conversation
Wire the pager's existing atomic counters into hypeman's OTel Prometheus bridge so otel-collector can scrape them alongside the other host exporters. The JSON /stats endpoint over the control unix socket is unchanged; a new opt-in TCP /metrics endpoint reads the same snapshot. --metrics-addr enables the pull endpoint. --otel-endpoint enables OTLP push. Both are opt-in so existing deployments keep working. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Pair with the new --metrics-addr flag: pass through an env var so per-instance overrides written via EnvironmentFile can opt in without editing the base unit. Empty default keeps the metrics server off for hosts that haven't been configured. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Required by scripts/check-uffd-version.sh whenever runtime files under lib/uffdpager change. The new metrics endpoint is additive and does not alter the UFFD wire protocol, but the pre-commit contract asks for an explicit version bump on any pager code change. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New flags on `hypeman-uffd-pager` (all opt-in, empty = disabled):
Metrics exposed
Counters: `hypeman_uffd_{cache_hits,cache_misses,faults,backing_bytes_read,copies,copy_errors}_total`, plus `_nanos_total` accumulators for cache lookup / add / fault / read-page / backing-read / copy latencies.
Gauges: `hypeman_uffd_{cache_bytes,cache_max_bytes,cache_items,cache_shards,active_sessions,active_faults,max_concurrent_faults,draining}`, plus high-water `_max_nanos` gauges for the same latencies.
Test plan