feat(maru): add Prometheus observability metrics to MaruBackend#8
Draft
hyunyul-XCENA wants to merge 2 commits into
Draft
feat(maru): add Prometheus observability metrics to MaruBackend#8hyunyul-XCENA wants to merge 2 commits into
hyunyul-XCENA wants to merge 2 commits into
Conversation
Add 6 self-contained Prometheus metrics using prometheus_client directly, with zero changes to LMCache core observability modules: - maru_put_task_num (Gauge): in-flight put tasks - maru_put_failed_count (Counter): store RPC failures - maru_get_blocking_failed_count (Counter): retrieve failures - maru_alloc_failed_count (Counter): CXL memory allocation failures - maru_store_latency_seconds (Histogram): store RPC latency - maru_retrieve_latency_seconds (Histogram): CXL read latency Metrics are exposed via vLLM /metrics endpoint when PROMETHEUS_MULTIPROC_DIR is set. Gauge uses multiprocess_mode and set_function for zero runtime overhead.
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
maru_backend.py/metricsendpoint withPROMETHEUS_MULTIPROC_DIRMetrics
lmcache:maru_put_task_numlmcache:maru_put_failed_countlmcache:maru_get_blocking_failed_countlmcache:maru_alloc_failed_countlmcache:maru_store_latency_secondslmcache:maru_retrieve_latency_secondsTest plan
curl localhost:$PORT/metrics | grep lmcache:maru