<@U03KWSKFN8L> would you be able to provide an exa...
# pacc-july-17-18-2023
d
@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
Are you looking for flow run metrics after the fact? e.g. when did flows run, for how long, etc?
d
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
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
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
Does prefect expose Prometheus metrics?
j
Folks use Prometheus with Prefect. You can see some discussion here. We donโ€™t have a special integration.
๐Ÿ‘ 1