Skip to content

Please return thread from start_http_server #883

Closed
@lukeyeager

Description

@lukeyeager

Similar to #314, but less invasive, IMHO.

I often wrap APIs with a small layer of Python to turn metrics into something that Prometheus can ingest. Rather than adding while True: sleep(1) or similar at the end of my scripts I would like to do this:

prometheus_client.REGISTRY.register(MyCollector())
thread = prometheus_client.start_http_server(80)
thread.join()

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