Skip to content

[Docs][Operator] Fix observability metric descriptions#2746

Merged
KuntaiDu merged 2 commits intoLMCache:devfrom
royyhuang:fix/obs_doc
Mar 14, 2026
Merged

[Docs][Operator] Fix observability metric descriptions#2746
KuntaiDu merged 2 commits intoLMCache:devfrom
royyhuang:fix/obs_doc

Conversation

@royyhuang
Copy link
Copy Markdown
Contributor

@royyhuang royyhuang commented Mar 11, 2026

Summary

  • Update L1 stats logger metric descriptions from "reserved" to "finished" for read/write keys
  • Update StorageManager stats logger metric descriptions to clarify read succeed/failed semantics
  • Update docs/source/mp/observability.rst to match the corrected descriptions

Test plan

  • Verify docs build without errors
  • Confirm metric descriptions in code match documentation

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the observability metric descriptions within the LMCache system and its corresponding documentation. The changes aim to enhance clarity and accuracy for both L1 stats logger and StorageManager metrics, ensuring that the reported data is understood correctly by users and developers.

Highlights

  • L1 Stats Logger Metrics: Updated descriptions for l1_read_keys and l1_write_keys from 'reserved' to 'finished' to accurately reflect their meaning.
  • StorageManager Metrics: Clarified descriptions for sm_read_succeed_keys and sm_read_failed_keys to better explain read success/failure semantics within LMCache.
  • Documentation Synchronization: Synchronized the observability.rst documentation file with the corrected metric descriptions from the code.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/source/mp/observability.rst
    • Updated the description for lmcache_mp:sm_read_succeed_keys to 'Number of keys that succeeded in reading from LMCache.'
    • Updated the description for lmcache_mp:sm_read_failed_keys to 'Number of keys that failed in reading from LMCache.'
    • Modified the description for lmcache_mp:l1_read_keys to 'Number of keys finished for read on L1.'
    • Modified the description for lmcache_mp:l1_write_keys to 'Number of keys finished for write on L1.'
  • lmcache/v1/mp_observability/logger/l1_stats_logger.py
    • Updated the description for the l1_read_keys counter from 'Total number of keys reserved for read on L1' to 'Total number of keys finished for read on L1'.
    • Updated the description for the l1_write_keys counter from 'Total number of keys reserved for write on L1' to 'Total number of keys finished for write on L1'.
  • lmcache/v1/mp_observability/logger/storage_manager_stats_logger.py
    • Updated the description for the sm_read_succeed_keys counter to 'Total number of keys that were succeed in reading from LMCache'.
    • Updated the description for the sm_read_failed_keys counter to 'Total number of keys that were cache failed in reading LMCache'.
Activity
  • The author proposed updates to observability metric descriptions for L1 stats logger and StorageManager.
  • The documentation file docs/source/mp/observability.rst was updated to reflect these changes.
  • The author plans to verify that the documentation builds without errors.
  • The author plans to confirm that metric descriptions in the code match the documentation.
  • The pull request was generated using Claude Code.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the descriptions for observability metrics in the documentation and in the code to improve clarity and correctness. The changes correctly align the metric descriptions for L1 with their implementation (counting 'finished' operations, not 'reserved'). The updated descriptions for StorageManager metrics are also an improvement, but contain minor grammatical errors. I've suggested fixes to correct the grammar and improve the phrasing for consistency with the documentation.

self._sm_read_succeed_keys_counter = self.create_counter(
"lmcache_mp:sm_read_succeed_keys",
"Total number of keys that were cache hits in SM read",
"Total number of keys that were succeed in reading from LMCache",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a grammatical error in this metric description. "were succeed" should be "succeeded". For better clarity and consistency with the documentation, I suggest rephrasing this.

Suggested change
"Total number of keys that were succeed in reading from LMCache",
"Total number of keys that succeeded in reading from LMCache",

self._sm_read_failed_keys_counter = self.create_counter(
"lmcache_mp:sm_read_failed_keys",
"Total number of keys that were cache misses in SM read",
"Total number of keys that were cache failed in reading LMCache",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The phrasing "were cache failed" is awkward and grammatically incorrect. I suggest simplifying this description to align with the phrasing in docs/source/mp/observability.rst.

Suggested change
"Total number of keys that were cache failed in reading LMCache",
"Total number of keys that failed in reading from LMCache",

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
@royyhuang royyhuang changed the title [Docs] Fix observability metric descriptions [Docs][Operator] Fix observability metric descriptions Mar 12, 2026
Copy link
Copy Markdown
Contributor

@ruizhang0101 ruizhang0101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Copy Markdown
Contributor

@KuntaiDu KuntaiDu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KuntaiDu KuntaiDu enabled auto-merge (squash) March 13, 2026 22:37
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Mar 13, 2026
@KuntaiDu KuntaiDu merged commit 4524210 into LMCache:dev Mar 14, 2026
25 of 28 checks passed
hyunyul-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Mar 20, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
realAaronWu pushed a commit to realAaronWu/LMCache that referenced this pull request Mar 20, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
Signed-off-by: Aaron Wu <aaron.wu@dell.com>
deng451e pushed a commit to deng451e/LMCache that referenced this pull request Mar 25, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
deng451e pushed a commit to deng451e/LMCache that referenced this pull request Mar 27, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
[Docs] Fix observability metric descriptions to match actual behavior

Update Prometheus metric descriptions in L1 and StorageManager stats
loggers and corresponding docs to accurately reflect what is measured.

Signed-off-by: royyhuang <roy.y.huang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants