I posted about a journal cleaner tool Here
This is for extracting commands that can be executed again in journal script but it might give you some ideas on how to do something similar for errors.
If it’s error in command execution and not errors in model, you can to look into custom telemetry output where you can state exactly what went wrong and be more precise than generic traceback. I think you can write them to journal as well as to telemetry log file
Are you are searching for keywords like “error”? Probably want to try and keep leading and trailing 10 lines so you don’t strip important context on what was happening when error occured.