def start_http_server(port, addr='', registry=REGISTRY):
    """Starts an HTTP server for prometheus metrics as a daemon thread"""
    CustomMetricsHandler = MetricsHandler.factory(registry)
    httpd = _ThreadingSimpleServer((addr, port), CustomMetricsHandler)
    t = threading.Thread(target=httpd.serve_forever)
    t.daemon = True
    t.start()
def start_http_server ( port , addr = '' , registry = REGISTRY ) : CustomMetricsHandler = MetricsHandler . factory ( registry ) httpd = _ThreadingSimpleServer ( ( addr , port ) , CustomMetricsHandler ) t = threading . Thread ( target = httpd . serve_forever ) t . daemon = True t . start ( )
Starts an HTTP server for prometheus metrics as a daemon thread