Skip to content

Add prom metrics to cloud's feature docs#848

Open
Piroddi wants to merge 1 commit intomainfrom
piroddi/prom-metrics
Open

Add prom metrics to cloud's feature docs#848
Piroddi wants to merge 1 commit intomainfrom
piroddi/prom-metrics

Conversation

@Piroddi
Copy link
Copy Markdown
Contributor

@Piroddi Piroddi commented Apr 2, 2026

Summary by CodeRabbit

  • Documentation
    • Clarified Built-in Alerts version requirements text for improved clarity.
    • Added comprehensive Monitoring section documenting Prometheus metrics exposure with detailed metric categories (progress and sync status, event processing, entity preloading, storage, data sources, fetching, indexing pipeline, reorgs and rollbacks, effect API, system info), example Prometheus configuration, and key metrics recommendations.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
envio-docs Ready Ready Preview, Comment Apr 2, 2026 7:38am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Documentation update to hosted-service-features.md clarifying the Built-in Alerts version requirement and introducing a new Monitoring section that documents Prometheus metrics exposure at the hyperindex/metrics endpoint with categorized metric descriptions and configuration guidance.

Changes

Cohort / File(s) Summary
Documentation - Monitoring & Alerts
docs/HyperIndex/Hosted_Service/hosted-service-features.md
Simplified Built-in Alerts version text. Added new Monitoring section documenting Prometheus metrics exposure (version 3.0.0+) with eight metric categories (progress, events, preloading, storage, data sources, pipeline, reorgs, effects, system info), example scrape configuration, and recommended key metrics to monitor.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • DenhamPreen

Poem

🐰 Hoppity hop through metrics galore,
Prometheus tales we now explore,
Monitoring magic in endpoint light,
Version three brings clearer sight,
Documentation blooms—oh what a sight! 📊✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—adding Prometheus metrics documentation to the hosted service features documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch piroddi/prom-metrics

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/HyperIndex/Hosted_Service/hosted-service-features.md (1)

180-180: Minor wording clarity improvement.

The description "Time the indexer source syncing has been idle" could be slightly clearer.

✨ Suggested improvement
-| `envio_indexing_idle_seconds` | counter | Time the indexer source syncing has been idle. A high value may indicate a bottleneck. Labeled by `chainId`. |
+| `envio_indexing_idle_seconds` | counter | Time the indexer has been idle during source syncing. A high value may indicate a bottleneck. Labeled by `chainId`. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperIndex/Hosted_Service/hosted-service-features.md` at line 180,
Update the description for the metric `envio_indexing_idle_seconds` to be
clearer: replace "Time the indexer source syncing has been idle" with a more
explicit phrase such as "Duration the indexer source has been idle (in seconds)
while waiting for new data or events" and keep the note about high values
indicating a potential bottleneck and the `chainId` label. Locate the table row
containing `envio_indexing_idle_seconds` and update only its description text
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/HyperIndex/Hosted_Service/hosted-service-features.md`:
- Around line 116-118: The fenced code block containing
"<your-endpoint-url>/hyperindex/metrics" in hosted-service-features.md lacks a
language identifier; update the opening fence to include a language (e.g.,
change ``` to ```plaintext) so the block reads as a labeled fenced code block
(keep the existing closing ``` unchanged) to satisfy markdownlint MD040.

---

Nitpick comments:
In `@docs/HyperIndex/Hosted_Service/hosted-service-features.md`:
- Line 180: Update the description for the metric `envio_indexing_idle_seconds`
to be clearer: replace "Time the indexer source syncing has been idle" with a
more explicit phrase such as "Duration the indexer source has been idle (in
seconds) while waiting for new data or events" and keep the note about high
values indicating a potential bottleneck and the `chainId` label. Locate the
table row containing `envio_indexing_idle_seconds` and update only its
description text accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5ea4c633-edd8-4f49-bcc6-74e6d7ad61ba

📥 Commits

Reviewing files that changed from the base of the PR and between c78957f and d93bcf8.

📒 Files selected for processing (1)
  • docs/HyperIndex/Hosted_Service/hosted-service-features.md

Comment on lines +116 to +118
```
<your-endpoint-url>/hyperindex/metrics
```
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.

⚠️ Potential issue | 🟡 Minor

Add language identifier to fenced code block.

The code block should specify a language identifier for proper syntax highlighting and markdown compliance.

📝 Proposed fix
 **Endpoint:**
-```
+```plaintext
 <your-endpoint-url>/hyperindex/metrics

</details>

As per coding guidelines, fenced code blocks should have a language specified (markdownlint MD040).

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion
**Endpoint:**
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 116-116: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperIndex/Hosted_Service/hosted-service-features.md` around lines 116 -
118, The fenced code block containing "<your-endpoint-url>/hyperindex/metrics"
in hosted-service-features.md lacks a language identifier; update the opening
fence to include a language (e.g., change ``` to ```plaintext) so the block
reads as a labeled fenced code block (keep the existing closing ``` unchanged)
to satisfy markdownlint MD040.

Copy link
Copy Markdown
Member

@DZakh DZakh left a comment

Choose a reason for hiding this comment

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

Nice, good to have it documented. I think it will stay like this; don't plan more changes here. Just left a few comments.

| `envio_progress_events` | gauge | Number of events processed and reflected in the database. Labeled by `chainId`. |
| `envio_progress_ready` | gauge | Whether the chain is fully synced to the head (`1` = synced). Labeled by `chainId`. |
| `envio_progress_latency` | gauge | Latency in milliseconds between event creation and storage write. Labeled by `chainId`. |
| `hyperindex_synced_to_head` | gauge | Whether all chains are fully synced to head (`1` = synced). |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| `hyperindex_synced_to_head` | gauge | Whether all chains are fully synced to head (`1` = synced). |

| `envio_progress_block` | gauge | Latest block number processed and stored in the database. Labeled by `chainId`. |
| `envio_progress_events` | gauge | Number of events processed and reflected in the database. Labeled by `chainId`. |
| `envio_progress_ready` | gauge | Whether the chain is fully synced to the head (`1` = synced). Labeled by `chainId`. |
| `envio_progress_latency` | gauge | Latency in milliseconds between event creation and storage write. Labeled by `chainId`. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| `envio_progress_latency` | gauge | Latency in milliseconds between event creation and storage write. Labeled by `chainId`. |

I wouldn't rely on this one


### Example: Key Metrics to Watch

- **`envio_progress_ready`** and **`hyperindex_synced_to_head`** — confirm your indexer is caught up to the chain head
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's not mention hyperindex_synced_to_head

- **`envio_progress_ready`** and **`hyperindex_synced_to_head`** — confirm your indexer is caught up to the chain head
- **`envio_progress_block`** — track indexing progress over time
- **`envio_processing_handler_seconds`** — identify slow event handlers by contract and event
- **`envio_indexing_idle_seconds`** — a high value may indicate the data source sync is a bottleneck
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It should be Querying seconds - idle means that the data source is not queried.

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