Aller au contenu
login
arrow_backRetour aux issues
prometheus-community/postgres_exporter #1373

Add deprecation warnings for DATA_SOURCE_* and PG_EXPORTER_* env vars

ecoDébutant help wanted go

descriptionDescription

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)`
codeOuvre sur GitHub