Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mdczaplicki authored and trallnag committed Aug 23, 2022
1 parent 3f1c500 commit 44381aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ the fast track to get started with a preconfigured instrumentator:
```python
from prometheus_fastapi_instrumentator import Instrumentator

Instrumentator().instrument(app).expose(app)
@app.on_event("startup")
async def startup():
Instrumentator().instrument(app).expose(app)
```

With this, your FastAPI is instrumented and metrics are ready to be scraped. The
Expand Down

0 comments on commit 44381aa

Please sign in to comment.