@Jeff Hale would you be able to provide an example of customizing a decorator? I read an article where someone customized the decorator to emit flow metrics. I am interested in integrating with Telegraf to capture flow metrics into a timeseries database to be visualized in Grafana.
โ 1
j
Jeff Hale
07/18/2023, 2:32 PM
Are you looking for flow run metrics after the fact? e.g. when did flows run, for how long, etc?
d
Darren Burton
07/18/2023, 2:36 PM
Yes. I know the data is written to the Prefect PostgreSQL database, but looking to write metrics into InfluxDB for analysis and visibility in Grafana. I guess another option is to write a flow that queries the data from PostgreSQL and writes it into InfluxDB.
j
Jeff Hale
07/18/2023, 2:38 PM
I'm thinking querying the DB, probably via the API likely would be better than a decorator, because you will likely want to filter by type of flow run state, etc.
d
Darren Burton
07/18/2023, 2:40 PM
Thanks for your feedback/suggestion. I hope to work on that over the next few weeks. As you might imagine the goal is to provide operational visibility to a larger audience without needed access to the Prefect dashboards or PostgresQL.
๐ 1
d
Daniel Lyons
07/18/2023, 3:11 PM
Does prefect expose Prometheus metrics?
j
Jeff Hale
07/18/2023, 3:18 PM
Folks use Prometheus with Prefect. You can see some discussion here. We donโt have a special integration.