If your app is already built with Rails, adding https://github.com/ankane/ahoy is pretty simple. Combine with https://github.com/ankane/blazer and you can build a reasonable set of reports as well.
It's pretty simple to extend too: I've added basic client-side (JavaScript) error reporting on top of it, and I'm thinking about using it for Content Security Policy reporting too.