Skip to content

Add prom metrics to cloud's feature docs#848

Open
Piroddi wants to merge 2 commits intomainfrom
piroddi/prom-metrics
Open

Add prom metrics to cloud's feature docs#848
Piroddi wants to merge 2 commits 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 wording to require indexers deployed with version 2.24.0 or higher.
    • Added a Monitoring section requiring indexers deployed with version 3.0.0 or higher.
    • Documented Prometheus metrics exposure at /hyperindex/metrics, full metric categories, example scrape configuration, and recommended key metrics to watch.

@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 7, 2026 11:43am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

Updated hosted-service-features.md: removed “blockchain” qualifier from Built-in Alerts version requirement, added a Monitoring section (requires indexers v3.0.0+) documenting Prometheus metrics at <your-endpoint-url>/hyperindex/metrics, categorized metric list, example scrape config, and recommended metrics.

Changes

Cohort / File(s) Summary
Documentation - Monitoring & Alerts
docs/HyperIndex/Hosted_Service/hosted-service-features.md
Clarified Built-in Alerts version wording; added Monitoring section (indexers v3.0.0+) documenting Prometheus metrics exposure at /hyperindex/metrics, full categorized metric list (progress & sync, event processing, entity preloading, storage, data source & fetching, indexing pipeline, reorgs & rollbacks, effect API, system info), example Prometheus scrape config, and recommended key metrics to watch.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • moose-code

Poem

🐰 I hopped to the docs with metrics in paw,

Prometheus bells and endpoint to draw,
Version three sings the monitoring tune,
Scrapes in the night beneath the moon,
Hooray — clearer metrics, hop hop hooray! 🎶

🚥 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 'Add prom metrics to cloud's feature docs' accurately describes 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will remove from docs


### 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removed

- **`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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure I follow. Do you want to rename this metric?

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.

♻️ Duplicate comments (2)
docs/HyperIndex/Hosted_Service/hosted-service-features.md (2)

116-118: ⚠️ Potential issue | 🟡 Minor

Add a language identifier to the fenced code block.

The endpoint block is still missing a language tag, which triggers markdownlint MD040.

Proposed fix
-```
+```plaintext
 <your-endpoint-url>/hyperindex/metrics
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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 "/hyperindex/metrics"
is missing a language tag (causing markdownlint MD040); update that block in
hosted-service-features.md by adding a language identifier such as plaintext or
text after the opening backticks (e.g., change toplaintext) so the code
fence becomes a labeled fenced code block.


</details>

---

`225-225`: _⚠️ Potential issue_ | _🟡 Minor_

**Remove `hyperindex_synced_to_head` from the recommended metrics list.**

This metric shouldn’t be referenced here; keep the guidance limited to the metrics documented in this section.

 
<details>
<summary>Proposed fix</summary>

```diff
-- **`envio_progress_ready`** and **`hyperindex_synced_to_head`** — confirm your indexer is caught up to the chain head
+- **`envio_progress_ready`** — confirm your indexer is caught up to the chain head
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against the current code and only fix it if needed.

In `@docs/HyperIndex/Hosted_Service/hosted-service-features.md` at line 225,
Remove the stray metric reference by deleting "`hyperindex_synced_to_head`" from
the recommended metrics list so the line reads only "**`envio_progress_ready`**
— confirm your indexer is caught up to the chain head"; locate the list entry
that currently contains both "`envio_progress_ready`" and
"`hyperindex_synced_to_head`" and update it to reference only
"`envio_progress_ready`".
```

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @docs/HyperIndex/Hosted_Service/hosted-service-features.md:

  • Around line 116-118: The fenced code block containing
    "/hyperindex/metrics" is missing a language tag (causing
    markdownlint MD040); update that block in hosted-service-features.md by adding a
    language identifier such as plaintext or text after the opening backticks (e.g.,
    change toplaintext) so the code fence becomes a labeled fenced code
    block.
  • Line 225: Remove the stray metric reference by deleting
    "hyperindex_synced_to_head" from the recommended metrics list so the line
    reads only "envio_progress_ready — confirm your indexer is caught up to
    the chain head"; locate the list entry that currently contains both
    "envio_progress_ready" and "hyperindex_synced_to_head" and update it to
    reference only "envio_progress_ready".

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `c129a675-f108-465b-b010-a33e21a351a9`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between d93bcf80c35b6a977728009474ed8dd6822f41aa and fa082cc1c0973da34eba53ccaab620e38c24eacb.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `docs/HyperIndex/Hosted_Service/hosted-service-features.md`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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