8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Flask example can be much simplified like this
from flask import Flask from werkzeug.middleware.dispatcher import DispatcherMiddleware from prometheus_client import make_wsgi_app # Create my app app = Flask(__name__) # Add prometheus wsgi middleware to route /metrics requests app.wsgi_app = DispatcherMiddleware(app.wsgi_app, { '/metrics': make_wsgi_app() })
It simply instruments your app object, no need to change semantics.
app
The text was updated successfully, but these errors were encountered:
Use app.wsgi_app/app.wsgi_app instead of app_dispatch/app in case it wasn't clear.
app.wsgi_app
app_dispatch
Sorry, something went wrong.
I've never used Flask so I'll have to take your word for it. Would you like to send a PR?
I think this can be closed! #563 was merged.
Of course! Thanks.
No branches or pull requests
The Flask example can be much simplified like this
It simply instruments your
app
object, no need to change semantics.The text was updated successfully, but these errors were encountered: