docs: document env.VAR_NAME support for collector_url, metrics_endpoint, and Prometheus Push Gateway fields - #3753
Conversation
|
Warning Review limit reached
More reviews will be available in 41 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
env.VAR_NAME support for collector_url, metrics_endpoint, and Prometheus Push Gateway fields
Confidence Score: 5/5Documentation-only changes with no code modifications; safe to merge. Both files contain only prose, table, and JSON example updates. The new content accurately describes the env var substitution feature and the JSON snippets are well-formed. No logic, config defaults, or runtime behaviour is altered. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "docs: update otel and prometheus docs" | Re-trigger Greptile |
Merge activity
|
…ndpoint`, and Prometheus Push Gateway fields (#3753) ## Summary Documents environment variable substitution support for `collector_url`, `metrics_endpoint`, and Prometheus Push Gateway fields (`push_gateway_url`, `username`, `password`). Previously, only header values were documented as supporting `env.VAR_NAME` — this update clarifies that endpoint URLs and credentials can also reference environment variables, keeping sensitive values out of stored configuration. ## Changes - Updated `collector_url` and `metrics_endpoint` field types to `string | EnvVar` and noted `env.VAR_NAME` support in their descriptions - Updated `push_gateway_url`, `username`, and `password` field types to `string | EnvVar` with the same notation - Expanded the "Environment Variable Substitution" section in the OTel docs to include `collector_url` and `metrics_endpoint` in the example and explanation - Clarified that stored configuration retains the `env.VAR_NAME` string and that resolved values are never persisted or returned in API responses - Added a new "With Environment Variables" example block to the Prometheus docs showing `push_gateway_url`, `username`, and `password` using `env.VAR_NAME` ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Review the updated docs pages for the OTel and Prometheus plugins and verify: - Field type columns reflect `string | EnvVar` where applicable - Example JSON snippets include `env.VAR_NAME` usage for endpoint URLs and credentials - The security behavior description (no persistence of resolved values, redaction in API responses) is accurate against the implementation ## Breaking changes - [ ] Yes - [x] No ## Security considerations The documentation now explicitly states that resolved environment variable values are never persisted to the database or config file, and that API responses return `EnvVar` objects with sensitive resolved values redacted. This is a documentation clarification of existing security behavior. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Documents environment variable substitution support for
collector_url,metrics_endpoint, and Prometheus Push Gateway fields (push_gateway_url,username,password). Previously, only header values were documented as supportingenv.VAR_NAME— this update clarifies that endpoint URLs and credentials can also reference environment variables, keeping sensitive values out of stored configuration.Changes
collector_urlandmetrics_endpointfield types tostring | EnvVarand notedenv.VAR_NAMEsupport in their descriptionspush_gateway_url,username, andpasswordfield types tostring | EnvVarwith the same notationcollector_urlandmetrics_endpointin the example and explanationenv.VAR_NAMEstring and that resolved values are never persisted or returned in API responsespush_gateway_url,username, andpasswordusingenv.VAR_NAMEType of change
Affected areas
How to test
Review the updated docs pages for the OTel and Prometheus plugins and verify:
string | EnvVarwhere applicableenv.VAR_NAMEusage for endpoint URLs and credentialsBreaking changes
Security considerations
The documentation now explicitly states that resolved environment variable values are never persisted to the database or config file, and that API responses return
EnvVarobjects with sensitive resolved values redacted. This is a documentation clarification of existing security behavior.Checklist
docs/contributing/README.mdand followed the guidelines