rycus86/prometheus_flask_exporter

View on GitHub
examples/gunicorn/server.py

Summary

Maintainability
A
3 hrs
Test Coverage
from flask import Flask

from prometheus_flask_exporter.multiprocess import GunicornPrometheusMetrics

app = Flask(__name__)
metrics = GunicornPrometheusMetrics(app)


@app.route('/test')
def index():
    return 'Hello world'


if __name__ == '__main__':
    app.run(debug=False, port=5000)