Add deprecation warnings for DATA_SOURCE_* and PG_EXPORTER_* env vars
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, postgresql
- Domain
- cli, observability
Research direction
Start with startup configuration and the kingpin Envar() handling, then trace how the datasource environment variables are read. Add warnings for each listed environment variable when it is used instead of its equivalent flag, identifying the replacement flag. Confirm that all listed Envar()-backed and datasource variables are covered and warnings appear at startup.
Written by the indexing model from the issue text.
Description
Part of #1371. Depends on #1372.
Summary
Once flag equivalents exist for all env vars (see #1372 for the DATA_SOURCE_* datasource flags; the PG_EXPORTER_* flags already have equivalents via kingpin's Envar()), log a warning at startup whenever an env var is used instead of its flag, pointing to the flag that should replace it.
Env vars to cover
Envar()-backed:PG_EXPORTER_WEB_TELEMETRY_PATH,PG_EXPORTER_DISABLE_DEFAULT_METRICS,PG_EXPORTER_AUTO_DISCOVER_DATABASES,PG_EXPORTER_EXTEND_QUERY_PATH,PG_EXPORTER_CONSTANT_LABELS,PG_EXPORTER_EXCLUDE_DATABASES,PG_EXPORTER_INCLUDE_DATABASES,PG_EXPORTER_METRIC_PREFIX,PG_EXPORTER_COLLECTION_TIMEOUT- Datasource:
DATA_SOURCE_NAME,DATA_SOURCE_URI(_FILE),DATA_SOURCE_USER(_FILE),DATA_SOURCE_PASS(_FILE)
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 835
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prometheus-community/postgres_exporter
-
BDU:2025-02344 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
prometheus-community/postgres_exporter#716 · 3 reactions ·
All issues in prometheus-community/postgres_exporter
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100