You probably already know that in contrast to debugging non-containerized apps in production, running a process in a container makes debugging a bit harder. If you use Kubernetes, these are some good tips on debugging Ruby processes in Kubernetes.
Kir Shatrov made a list of some Kubernetes tips to ease your debugging processes in Ruby. In a nutshell, these tips include Rbspy sampling profiler for Ruby programs and gdb for dumping MRI call stack. But with the recent release of rbspy there’s no need to use gdb much anymore because rbspy doesn’t pause the process.
See the details and examples in the original article.
p.s. By the way, have you read about the new CI/CD solution, Jenkins X for cloud applications on Kubernetes?