Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
Fix prometheus instrumentator (#651)
Browse files Browse the repository at this point in the history
Co-authored-by: mike0sv <mike0sv@gmail.com>
  • Loading branch information
aguschin and mike0sv committed Apr 12, 2023
1 parent 90f1f7d commit 462384e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mlem/contrib/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def instrumentator(self):
return self.instrumentator_cache

def on_app_init(self, app: FastAPI):
self.instrumentator.instrument(app)

@app.on_event("startup")
async def _startup():
self.instrumentator.expose(app)
Expand Down

0 comments on commit 462384e

Please sign in to comment.