Skip to content

Using start_http_server results into undefined behaviour #4

Closed
@sbrandtb

Description

@sbrandtb

When starting a Flask app in debug mode (werkzeug server) on port, let's say, 5000 and using PrometheusMetrics.start_http_server on another port, let's say 9000, Prometheus endpoint is served properly on port 9000, but also on port 5000, resulting in responses that come randomly from the original or the prometheus Flask app.

I'm not sure if that's a limitation of werkzeug - however, when running the original Flask app with another WSGI container, this behaviour disappears.

So, why not just use start_http_server of prometheus_client under the hood? Is there a particular reason to serve metrics via Flask?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions