-
Notifications
You must be signed in to change notification settings - Fork 3
docs: update monitoring and telemetry references in validator documentation #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tation - Changed "Monitoring" to "Monitoring & Telemetry" in the metadata and relevant sections. - Updated environment variable names for clarity and consistency in the monitoring setup instructions. - Enhanced the setup guide with new authentication details for central monitoring services.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughDocs and compose/config examples updated to centralize telemetry: labels/titles changed to "Monitoring & Telemetry", MONITORING_* renamed to CENTRAL_MONITORING_* and CENTRAL_LOKI_, and Prometheus/Loki/Alloy/docker-compose examples adjusted to use CENTRAL_ endpoints, credentials, and new defaults. Changes
Sequence Diagram(s)sequenceDiagram
participant Node as Node (validator)
participant Alloy as Alloy (local collector)
participant CentralM as Central Monitoring (Prometheus)
participant CentralL as Central Loki (Loki)
Node->>Alloy: expose metrics endpoint & write logs (file)
Alloy->>CentralM: remote_write (CENTRAL_MONITORING_URL + BASIC_AUTH)
Alloy->>CentralL: push logs (CENTRAL_LOKI_URL + BASIC_AUTH)
Alloy->>Alloy: self-scrape (ALLOY_SELF_MONITORING_INTERVAL)
Note right of Alloy: relabeling, SCRAPE_TARGETS_JSON, tail_from_end, batching & queue_config applied
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this 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
🤖 Fix all issues with AI agents
In `@pages/validators/setup-guide.mdx`:
- Around line 629-650: The CENTRAL_MONITORING_URL and CENTRAL_LOKI_URL env
values currently include full endpoint paths, causing duplicated/malformed URLs
when the Alloy config appends its own paths; change those env variables
(CENTRAL_MONITORING_URL, CENTRAL_LOKI_URL) to be base URLs only (e.g.,
https://prometheus-prod-66-prod-us-east-3.grafana.net and
https://logs-prod-042.grafana.net) and remove any trailing path segments so the
monitoring config can safely append /api/v1/write or /loki/api/v1/push; apply
the same change to the corresponding examples used by the Alloy monitoring
config to keep both docs consistent.
| ### Telemetry | ||
|
|
||
| For a quick setup using Docker Compose: | ||
|
|
||
| 1. **Configure your `.env` file** with the required variables for monitoring: | ||
|
|
||
| ```env copy | ||
| # Grafana Cloud credentials (request from Foundation team in Discord #testnet-asimov) | ||
| CENTRAL_MONITORING_URL=https://prometheus-prod-...grafana.net | ||
| CENTRAL_LOKI_URL=https://logs-prod-...grafana.net | ||
| MONITORING_USERNAME=1234567890 # your instance ID | ||
| MONITORING_PASSWORD=glc_xxxxxxxxxxxxxxxxxxxxxxxxxxxx # API key | ||
| # Your node labels (customize for easy filtering in dashboards) | ||
| NODE_ID=0xYourValidatorAddressOrCustomID | ||
| VALIDATOR_NAME=validatorname | ||
| # Central monitoring server endpoints for GenLayer Foundation | ||
| CENTRAL_MONITORING_URL=https://prometheus-prod-66-prod-us-east-3.grafana.net/api/prom/push | ||
| CENTRAL_LOKI_URL=https://logs-prod-042.grafana.net/loki/api/v1/push | ||
| # Authentication for central monitoring | ||
| # Metrics (Prometheus) credentials | ||
| CENTRAL_MONITORING_USERNAME=your-metrics-username | ||
| CENTRAL_MONITORING_PASSWORD=your-metrics-password | ||
| # Logs (Loki) credentials | ||
| CENTRAL_LOKI_USERNAME=your-logs-username | ||
| CENTRAL_LOKI_PASSWORD=your-logs-password | ||
| # Node identification | ||
| NODE_ID=validator-001 | ||
| VALIDATOR_NAME=MyValidator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Search for Alloy config files that use CENTRAL_* variables
fd -type f -name "*.alloy" -o -name "*alloy*" -type f | head -20Repository: genlayerlabs/genlayer-docs
Length of output: 240
🏁 Script executed:
# Search for mentions of CENTRAL_MONITORING_URL and CENTRAL_LOKI_URL in codebase
rg "CENTRAL_MONITORING_URL|CENTRAL_LOKI_URL" -A 3 -B 3Repository: genlayerlabs/genlayer-docs
Length of output: 3527
🏁 Script executed:
# Search for monitoring-related documentation
fd -type f \( -name "*monitoring*" -o -name "*telemetry*" \) | grep -E "\.(md|mdx)$"Repository: genlayerlabs/genlayer-docs
Length of output: 240
🏁 Script executed:
# Look for docker-compose files that may show how these env vars are used
fd -type f -name "docker-compose*.yml" -o -name "docker-compose*.yaml"Repository: genlayerlabs/genlayer-docs
Length of output: 240
Fix double-path bug in CENTRAL_ URLs — remove path components from env values.*
Lines 635-638 show full endpoint paths, but the Alloy config in pages/validators/monitoring.mdx appends additional paths:
CENTRAL_LOKI_URL+/loki/api/v1/push→ malformed double pathCENTRAL_MONITORING_URL+/api/v1/write→ wrong endpoint path
The .env values must be base URLs only:
-CENTRAL_MONITORING_URL=https://prometheus-prod-66-prod-us-east-3.grafana.net/api/prom/push
-CENTRAL_LOKI_URL=https://logs-prod-042.grafana.net/loki/api/v1/push
+CENTRAL_MONITORING_URL=https://prometheus-prod-66-prod-us-east-3.grafana.net
+CENTRAL_LOKI_URL=https://logs-prod-042.grafana.netApply the same fix to pages/validators/monitoring.mdx for consistency.
🤖 Prompt for AI Agents
In `@pages/validators/setup-guide.mdx` around lines 629 - 650, The
CENTRAL_MONITORING_URL and CENTRAL_LOKI_URL env values currently include full
endpoint paths, causing duplicated/malformed URLs when the Alloy config appends
its own paths; change those env variables (CENTRAL_MONITORING_URL,
CENTRAL_LOKI_URL) to be base URLs only (e.g.,
https://prometheus-prod-66-prod-us-east-3.grafana.net and
https://logs-prod-042.grafana.net) and remove any trailing path segments so the
monitoring config can safely append /api/v1/write or /loki/api/v1/push; apply
the same change to the corresponding examples used by the Alloy monitoring
config to keep both docs consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pages/validators/monitoring.mdx (1)
386-393: Inconsistent formatting in troubleshooting section.The troubleshooting items (lines 387-390) lack proper markdown list formatting, making them render as a continuous paragraph instead of distinct items.
📝 Suggested fix
— it should return Prometheus-formatted data. -Authentication errors (401/403): Double-check CENTRAL_MONITORING_USERNAME, CENTRAL_MONITORING_PASSWORD, CENTRAL_LOKI_USERNAME, and CENTRAL_LOKI_PASSWORD in .env. -No data pushed: Ensure URLs in .env have no trailing slash. -Help: Share Alloy logs +- **Authentication errors (401/403):** Double-check `CENTRAL_MONITORING_USERNAME`, `CENTRAL_MONITORING_PASSWORD`, `CENTRAL_LOKI_USERNAME`, and `CENTRAL_LOKI_PASSWORD` in `.env`. +- **No data pushed:** Ensure URLs in `.env` have no trailing slash. +- **Help:** Share Alloy logs
🤖 Fix all issues with AI agents
In `@pages/validators/monitoring.mdx`:
- Line 127: The bold marker in the markdown line "2. **Add or verify the Alloy
service in docker-compose.yaml (copy if missing):" is not closed; update that
line in pages/validators/monitoring.mdx by adding the missing closing ** after
"missing):" so the bolded text is properly wrapped (i.e., ensure the phrase
between the pair of ** is balanced).
- Around line 121-122: The NODE_METRICS_ENDPOINT default in the .env example is
inconsistent; update the example value for NODE_METRICS_ENDPOINT from
"localhost:9153" to "host.docker.internal:9153" so it matches the docker-compose
default (host.docker.internal:9153) and ensures the example reflects running
Alloy inside a container.
🧹 Nitpick comments (1)
pages/validators/monitoring.mdx (1)
157-163: Consider using non-functional placeholder credentials.The default credentials
telemetric/12345678appear to be functional test credentials. If users miss configuring their.envfile, the service might appear to work but send data to an unintended destination or fail silently with auth errors.Consider using obviously invalid placeholders that force users to configure credentials explicitly:
📝 Suggested change
# Metrics (Prometheus) authentication - - CENTRAL_MONITORING_USERNAME=${CENTRAL_MONITORING_USERNAME:-telemetric} - - CENTRAL_MONITORING_PASSWORD=${CENTRAL_MONITORING_PASSWORD:-12345678} + - CENTRAL_MONITORING_USERNAME=${CENTRAL_MONITORING_USERNAME:-REPLACE_ME} + - CENTRAL_MONITORING_PASSWORD=${CENTRAL_MONITORING_PASSWORD:-REPLACE_ME} # Logs (Loki) authentication - - CENTRAL_LOKI_USERNAME=${CENTRAL_LOKI_USERNAME:-telemetric} - - CENTRAL_LOKI_PASSWORD=${CENTRAL_LOKI_PASSWORD:-12345678} + - CENTRAL_LOKI_USERNAME=${CENTRAL_LOKI_USERNAME:-REPLACE_ME} + - CENTRAL_LOKI_PASSWORD=${CENTRAL_LOKI_PASSWORD:-REPLACE_ME}
- Changed NODE_METRICS_ENDPOINT from localhost to host.docker.internal for improved compatibility in Docker environments. - Minor formatting adjustment in the instructions for adding or verifying the Alloy service in docker-compose.yaml.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.