Hi. DaskTaskRunner is logging <dashboard url> afte...
# prefect-community
v
Hi. DaskTaskRunner is logging dashboard url after cluster is created. Is it possible to stream this log to the Cloud logs? Thanks.
c
Have you setup the task logger for the task?
v
I am not sure I understand your question. It is not task, it is
_start
method which logs information about created cluster and I don't see this info log in the Cloud logs.
c
What is the code that starts your cluster
c
This is your flow / task code?
I’m trying to get at whether you have a logger a configured for the task / flow - I understand that there is logging enabled within the engine, any many of those are surfaced to the agent, but not to the cloud without a task / flow logger.
This came up previously, and I believe the same question was asked to the same results - are you logging in the task / flow itself with a logging context? If you are, and we still aren’t getting logs, I can take this feedback to the engineering team and determine if this is a bug - we do have an open issue with streaming worker logs from Dask because of how the logger is serialized. If there is not a logging context in the task / flow, then lets do that first.
v
It is not task / flow code. It is task runner code and as I understand it is running before flow is started.
c
I think the short answer discussing with the team is as I mentioned earlier - : the core problem is serialization and deserialization of logger object on the dask end causes that we lose Prefect logger configuration and the logger reinstantiates itself https://discourse.prefect.io/t/why-are-the-dask-logs-not-being-shown-in-the-prefect-ui/75 The current workaround is to use another log source like datadog or cloudwatch