Skip to content

Port collision with primary webserver process #7

@brian-lc

Description

@brian-lc

Hello, I was wondering about the decision to include PORT as the default here. My understanding might be wrong but if I have a webserver like Unicorn or Puma I probably have 'PORT' defined in my environment already. When starting the metrics server from my Unicorn process (for example) the metrics server would fail to start due to port collision with the already running unicorn. So I pretty much have to define 'PROMETHEUS_EXPORTER_PORT=9394' even if I'm okay with the default port number.

I'm happy to write up a PR for this change but thought I'd ask about the usage or thoughts behind this line of code first.

Thanks much! Really appreciate this project and your work!

default_port = ENV.fetch('PORT', 9394)

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