Skip to content

docs: document env.VAR_NAME support for collector_url, metrics_endpoint, and Prometheus Push Gateway fields - #3753

Merged
akshaydeo merged 1 commit into
devfrom
05-26-docs_update_otel_and_prometheus_docs
May 26, 2026
Merged

docs: document env.VAR_NAME support for collector_url, metrics_endpoint, and Prometheus Push Gateway fields#3753
akshaydeo merged 1 commit into
devfrom
05-26-docs_update_otel_and_prometheus_docs

Conversation

@BearTS

@BearTS BearTS commented May 26, 2026

Copy link
Copy Markdown
Contributor

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
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • 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
  • 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
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@BearTS, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af9f51ed-8cce-4903-b751-60c2dff984ea

📥 Commits

Reviewing files that changed from the base of the PR and between 74831c9 and a1f3163.

📒 Files selected for processing (2)
  • docs/features/observability/otel.mdx
  • docs/features/observability/prometheus.mdx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 05-26-docs_update_otel_and_prometheus_docs

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

@BearTS
BearTS marked this pull request as ready for review May 26, 2026 08:23

BearTS commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@BearTS BearTS changed the title docs: update otel and prometheus docs docs: document env.VAR_NAME support for collector_url, metrics_endpoint, and Prometheus Push Gateway fields May 26, 2026
@greptile-apps

greptile-apps Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

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

Filename Overview
docs/features/observability/otel.mdx Documents env var substitution support for collector_url and metrics_endpoint fields; updates type annotations and adds example JSON snippets
docs/features/observability/prometheus.mdx Documents env var substitution for push_gateway_url, username, and password; adds a new "With Environment Variables" config example inside the Config File tab

Reviews (1): Last reviewed commit: "docs: update otel and prometheus docs" | Re-trigger Greptile

akshaydeo commented May 26, 2026

Copy link
Copy Markdown
Contributor

Merge activity

  • May 26, 8:55 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 26, 8:56 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit fcd3eff into dev May 26, 2026
15 checks passed
@akshaydeo
akshaydeo deleted the 05-26-docs_update_otel_and_prometheus_docs branch May 26, 2026 08:56
akshaydeo pushed a commit that referenced this pull request May 26, 2026
…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
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