Adam

    Adam

    2 years ago
    Good morning friends. A quick question on debugging with logs shown on the Prefect Cloud UI. I have some error logs buried among my info logs, but I’m having a hard time displaying them while keeping the info logs visible. I can filter for error logs, but then I want to see the logs surrounding those (i.e. the info logs) but I can’t seem to find a clever way of doing that in the Prefect Cloud UI. Any thoughts? Downloading the logs would also be an option but it seems it only downloads logs for the rendered page.
    Jenny

    Jenny

    2 years ago
    Hi @Adam - thanks for the question. If I understand correctly - you want to be able to filter for error logs but then be able to see info logs on either side of any error message?
    One option would be to apply an error filter => grab the permalink to the error log, then open that link in a new tab. The logs will scroll automatically to that error and show all the surrounding logs as well.
    Please also open a ticket if that's an enhancement you'd like in the UI - we always welcome input and feedback.
    Adam

    Adam

    2 years ago
    Thanks @Jenny that was super helpful. On the same topic, now that I can see whats on either side, I’m not sure I understand where this log comes from. It doesn’t seem to be from a task itself - perhaps something related to prefect cloud?
    Jenny

    Jenny

    2 years ago
    Hi @Adam - what version of Prefect Core are you using?
    Adam

    Adam

    2 years ago
    Hi @Jenny, we build our Docker images with
    latest-python3.8
    , the Kubernetes Agent is running the same (so 0.13.2)
    Jenny

    Jenny

    2 years ago
    Thanks @Adam - The basic answer here is that it's from trying to log something that's not JSON serializable. But given your comment, I'm double-checking with the team to see if they can give any more info.
    Hi Adam - no further info to add to my comment above. But if you are able to give us a reproducible example, we'd be very happy to look further into it.