stephenhillier / starlette_exporter

Prometheus exporter for Starlette and FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Support async label callback

nemanjab17 opened this issue · comments

Would be nice if we could define async callback functions that will produce metric label. If request body is needed to be parsed in the callback, we need to await since starlette body() is a coroutine. I inspected the code and it seems trivial to add. Thanks!

@nemanjab17 Good idea- will look at implementing this when I get a chance.