https://prefect.io logo
Title
s

Samuel Kohlleffel

11/15/2022, 8:47 PM
Does anyone know of a Prefect native way (some context variable, etc.) to log out from a Prefect flow the k8s job name it ran on? It would be very useful for monitoring/debugging purposes.
r

redsquare

11/15/2022, 9:00 PM
s

Samuel Kohlleffel

11/15/2022, 9:04 PM
Sorry - I think I phrased the initial question poorly. I know how to log out from a Prefect flow. I was wondering if, from inside the flow itself, there's a Prefect context variable or similar that contains the k8s job name the flow ran on. I want to log out that k8s job name as an info level log with
get_run_logger()
.
r

redsquare

11/15/2022, 9:19 PM
ah sorry, not that I know - youll need to play with mounting volumes and the downwardAPI I think