Hello again <@ULVA73B9P>. I'd like to see analytic...
# ask-marvin
m
Hello again @Marvin. I'd like to see analytic data on Tasks and Flows, stuff like "p95 and p50 of duration, grouped by task name or flow name". Is this possible in Prefect "out of the box" or would i need to write my own tools with the API to do this?
m
Prefect does not provide built-in analytics for calculating metrics like p95 or p50 durations directly from tasks and flows. However, Prefect does offer some basic metrics such as the duration of flow runs. You would likely need to implement custom analytics using Prefect's API to achieve more detailed insights like p95 and p50 durations. Here's a brief overview of what you can do: - Use Prefect's API to retrieve flow and task run data. - Calculate the desired metrics (p95, p50) using this data in your own analytics tool or script. For more about flow and task metrics, you can refer to Prefect's documentation on custom triggers and metrics. If you decide to create a custom solution, you can start by exploring Prefect's client API to fetch task and flow run data programmatically. You can find relevant functions like
get_client
in the Prefect API tree. If you have any more specific questions or need further assistance on how to implement this, feel free to ask!
m
Thank you @Marvin! Is there a way to retrieve data for global concurrency limits around how much time is spent waiting for them, the sum of tasks that have ever waited, a list of wait times per task, etc?
m
Prefect's documentation on global concurrency limits does not explicitly mention built-in metrics for tracking how much time tasks spend waiting due to these limits, nor does it provide direct insights into the sum of tasks that have waited or detailed wait times per task. However, you can configure concurrency limits with slot decay to manage how frequently tasks can run, which indirectly affects wait times. For more detailed analytics like total wait times or a list of wait times per task, you would likely need to implement custom logging and analysis using Prefect's API. For more information on global concurrency limits, you can refer to the Prefect documentation on concurrency limits. If you need further assistance on how to implement this or have more questions, feel free to ask!