Skip to content

Add --datasource.* CLI flags to replace DATA_SOURCE_* env vars #1372

Open

Description

@nicolastakashi

Part of #1371.

Summary

GetDataSources() in exporter/datasource.go currently reads the Postgres connection config only from env vars, with no CLI flag path. Add flags that provide the same configuration options, so the env vars have something to deprecate in favor of.

New flags

  • --datasource.dsn (replaces DATA_SOURCE_NAME)
  • --datasource.uri (replaces DATA_SOURCE_URI)
  • --datasource.uri-file (replaces DATA_SOURCE_URI_FILE)
  • --datasource.user (replaces DATA_SOURCE_USER)
  • --datasource.user-file (replaces DATA_SOURCE_USER_FILE)
  • --datasource.pass (replaces DATA_SOURCE_PASS)
  • --datasource.pass-file (replaces DATA_SOURCE_PASS_FILE)

Activity

  1. added a commit that references this issue on Aug 23, 2026
    4498850
  2. ArthurSens commented on Aug 24, 2026

    @ArthurSens
    Contributor

    Same feedback we gave to #1376: Let's not have sensitive information like database secrets in CLI flags. This can be easily exploited because CLI flags are written to files in the /proc filesystem.

  3. added 2 commits that reference this issue on Sep 18, 2026
    217c621
    d705b6a
  4. added 8 commits that reference this issue on Sep 25, 2026
    78a5421
    9291d08
    6f8787e
    6924518
    9036e63
    8beb659
    89dda93
    e7bcf93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    goPull requests that update go codehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions