Skip to content

Expose the addr bit of prometheus' start_http_server() in the config #59

Description

@tadzik

listen_port being passed on to prometheus.start_http_server makes it a whole listen_address, rather than just a port, making configs look confusing when you actually need not-just-a-port in there.

Perhaps it'd be worth to rename it, keeping the existing one as a deprecated alias for a while?

metrics in the configuration only exposes port as a configurable, making it tricky to listen on non-standard addresses if needed.

Activity

  1. tulir commented on Nov 1, 2021

    @tulir
    Member

    prometheus_client.start_http_server's first argument seems to be specifically a port as an integer, not an address? The second argument is addr, making that configurable might be useful

    As for renaming config fields, the config update system exists specifically to support legacy field names without any fallbacks in the actual code.

  2. tadzik commented on Nov 1, 2021

    @tadzik
    ContributorAuthor

    Hmm, indeed – seems like we've been misusing it for quite a while, and it's been working due to a happy accident more than anything else...

  3. changed the title [-]metrics.listen_port is actually a listen-in-general[/-] [+]Expose the `addr` bit of prometheus' start_http_server() in the config[/+] on Nov 1, 2021
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions