https://prefect.io logo
Title
a

Adam

10/31/2022, 12:50 PM
Hi friends, what is the Prefect 2.0 equivalent of state handlers? I’m looking to build in some integration in our flows to report metrics per flow and task to datadog and I need some way to hook in to the flow and task lifecycle
k

Kalise Richmond

10/31/2022, 5:46 PM
Hey Adam, here's a good example for state handlers at the task level. At the flow level, you should be able to use the run context with native python.
a

Adam

10/31/2022, 8:03 PM
Thanks! I think it might be hard to do it this way programatically for all our flows. I heard the ‘Triggers’ feature is something to look out for?