https://prefect.io logo
Title
n

Nick Hoffmann

03/14/2023, 4:27 PM
Hey all, has anyone tried setting up a Grafana dashboard or Prometheus datasource for Prefect 2? I saw that there's this closed issue about it, and this somewhat related open issue about it, but nothing actually implemented. I also found this community-made Prometheus exporter, but it hasn't been touched since June 2022 and looks like its for Prefect v1. Does anyone know of any other existing Prometheus exporters or anything that would be helpful for collecting Prefect metrics? I know I can also make my own using the Prefect API, but I was just hoping there was an already-existing solution somewhere.
c

Christopher Boyd

03/14/2023, 10:32 PM
I never got a chance to update / port it to Prefect2; I know at a point we were discussing exposing a metrics endpoint which kept me from porting this, although it should provide enough description to adapt it for v2 (albeit converting to rest api instead of graphql)
n

Nick Hoffmann

03/15/2023, 12:23 PM
Gotcha, thank you!
k

kasteph

05/08/2023, 10:27 AM
Hey @Nick Hoffmann, what did you end up doing for exporting metrics s.t. it can be nicely displayed on Grafana? Did you end up using the custom Prometheus exporter?
n

Nick Hoffmann

05/08/2023, 1:30 PM
I did not end up making one, that was more work than was worth for the time being. Instead I just push metrics to the prometheus pushgateway from each flow run to get the basics, like flow start time, duration, status, etc. I toyed with the idea of getting more in depth with it and interacting with the REST API from the flow itself to get closer to mimicking an actual exporter, but I turned that down for the sake of simplicity
k

kasteph

05/09/2023, 12:34 PM
hm, I see that makes sense. Thanks!