You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For anyone reading in the future, my solution for this was to create a function that creates my metrics and returns some closured periodic exporter. For example, in my case I needed something that grabbed values from SQLAlchemy:
Then, in my case, I wanted this to run alongside my FastAPI app. So I simply added it as a startup callback that creates an asyncio task that runs forever:
Question
It seems that async custom metrics are not supported, as this is the signature for the callback:
Does it mean that collecting each metric is blocking, or for example do they run in separate threads and then aggregated before the interval ends?
The text was updated successfully, but these errors were encountered: