Skip to content

Commit

Permalink
Simplify ASGI documentation in README
Browse files Browse the repository at this point in the history
Signed-off-by: Emil Madsen <sovende@gmail.com>
  • Loading branch information
Skeen committed Feb 18, 2020
1 parent 4f1d836 commit 050bb5c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,6 @@ start_wsgi_server(8000)
To use Prometheus with [ASGI](http://asgi.readthedocs.org/en/latest/), there is
`make_asgi_app` which creates an ASGI application.

Save the snippet below in a `myapp.py` file

```python
from prometheus_client import make_asgi_app

Expand All @@ -321,17 +319,6 @@ app = make_asgi_app()
Such an application can be useful when integrating Prometheus metrics with ASGI
apps.

The app can be used to serve the metrics through an ASGI implementation, such
as [daphne](https://github.com/django/daphne) or
[uvicorn](https://www.uvicorn.org/).
```bash
# Install daphne if you do not have it
pip install daphne
daphne myapp:app
```

Visit http://localhost:8000/ to see the metrics

#### Flask

To use Prometheus with [Flask](http://flask.pocoo.org/) we need to serve metrics through a Prometheus WSGI application. This can be achieved using [Flask's application dispatching](http://flask.pocoo.org/docs/latest/patterns/appdispatch/). Below is a working example.
Expand Down

0 comments on commit 050bb5c

Please sign in to comment.