rails / mission_control-jobs

Dashboard and Active Job extensions to operate and troubleshoot background jobs
MIT License
611 stars 71 forks source link

Feature Request: Display execution logs in mission-control_jobs job detail page #126

Open funwarioisii opened 5 months ago

funwarioisii commented 5 months ago

Are there any plans to have mission-control_jobs display logs on the detail page of jobs that have been run? Normally, we will use logger for output when a job is executed. However, I don't see it on the job detail page for this product. It would be very helpful if there is.

rosa commented 3 weeks ago

No, no plans at the moment, as the way people manage and store logs is not something really well-defined or standardized, and there's no simple way we could implement this. I think it could be some sort of plugin/add-on by a logging library that allows you to easily search for execution logs for jobs.

Where are you storing your logs at the moment? How are you searching in them?

funwarioisii commented 3 weeks ago

Currently, I am working solo on a small project. I have a Rails application running on AWS ECS Fargate, and the logs are being sent to CloudWatch Logs. As a result, I have to manually navigate CloudWatch Logs and use ⌘+F to search for the necessary logs. While this isn't an issue for me as an engineer, there are non-engineers on my team who sometimes need to access the logs, and that's been a challenge.

The best log retrieval experience I've had was with Kuroko2's WebUI, which retained logs for each executed job. This was designed with the assumption that CloudWatch Logs would be used as the logging infrastructure (though it could also be implemented with other loggers like BigQuery).

Reference: https://github.com/cookpad/kuroko2/blob/f41c744bb61b5157f174bfd8f01bf111e5f9ec13/lib/autoload/kuroko2/execution_logger/cloud_watch_logs.rb

However, it's important to note that using a cloud logging infrastructure isn't necessarily a common assumption for all Rails applications. Considering Solid Queue, as just an idea, it might be better to insert log text directly into a database 💭