Repository navigation
Add OpenTelemetry per-LV metrics - #11
Merged
Merged
Conversation
added 4 commits
November 9, 2026 18:33
Add optional OTLP/gRPC metrics export with per-logical-volume size, presence, export, and session gauges labeled by owner, volume, LV, VG, storage class, and state. Collection reads all live volume statuses rather than the admin UI page limit.
Replace the OTLP push exporter with an OpenTelemetry-backed Prometheus registry served on the existing mTLS /metrics endpoint. The collector now scrapes metrics instead of receiving pushed data.
Allow collectors to scrape /metrics without mTLS by configuring observability.metrics.address. The listener is disabled and loopback-only by default; the existing mTLS metrics endpoint remains available.
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
Adds per-logical-volume metrics to a pull-based OpenTelemetry/Prometheus registry. A dedicated plaintext metrics listener can be enabled so collectors do not need to handle mTLS; the existing mTLS
/metricsendpoint remains available.Per-LV metrics
OpenTelemetry instruments carry these labels:
kouja.ownerkouja.volume_idkouja.lv_namekouja.vg_namekouja.storage_classkouja.statekouja.export_protocolwhen exportedMetrics:
kouja.lv.requested_bytes,actual_bytes,observed_bytes,present,exported,active_sessions, andinfo.Prometheus translation produces names such as
kouja_lv_requested_bytesandkouja_lv_active_sessions.Metrics listeners
/metricsso a collector can scrape without mTLS./metricsendpoint on port 9443 remains available.Verification
make testmake lintmake coverage-check(80.4%, floor 80%)/metricsserving and shutdownNo OTLP push endpoint, interval, or headers are required.