Prefect-aws: Extend worker log with aws-task-id #16116
Labels
enhancement
An improvement of an existing feature
integrations
Related to integrations with other services
Describe the current behavior
Hey!
If something strange happens with a prefect-flow started by a
ecs
-worker, it is a little cumbersome to find the fullcloud-watch
-logs.For instance in a case like this:
Here the task crashed withouth outputing the full logs to the prefect-ui, and we need to dig into the
cloud-watch
-logs.But finding the correct
cloud-watch
-stream is currently not straight forward. We either need to search for something like the flow-name (might not be unique), or around the timestamp the issue occured. If there are a lot of other streams around the same time, this is more timeconsuming than it needs to be.Describe the proposed behavior
For instance extend https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-aws/prefect_aws/workers/ecs_worker.py#L796 with the
task_arn
. With this we would have a precise way of finding the correct log-streamExample Use
We could then use the
MY_UNKNOWN_TASK_ID
logged in the prefect-cloud-ui by the worker, to see if there are some more log-events in cloudwatchAdditional context
If all logs from the log-stream could be delivered to the prefect-ui, that would also be a nice alternative
The text was updated successfully, but these errors were encountered: