Critical logs presenter via mini-rake-profiler


#1

Good day.

I was looking to build a tool for manual testing on staging server. If you do not mind, I will explain the problem first and then solution I envision now.

Problem

It’s a great practice in testing to write system in a way, that throws all the errors in your face. But it is hard to follow this approach with some of the low level components – let’s say sidekiq error-ed out, api returned some error…

In most of those cases we would probably log this error (or a warning) or redirect it to centralized error aggregation service (like honeybadger). But we shall probably not show ‘in tester face’ that this problem occurred.

Most of the time manual tests are executed on Staging instance. By people who are not aware of code architecture and have problems matching error logs with actions they perform in test environment.

My proposed solution to this problem would be:

  • Show a hovering widget on all pages of application (shown depending on ENV variable)
  • Add profiler logger into rails
  • show filtered logs on interface (let’s say only with :error level)
  • provide a good indicator that error has occurred (adding a numbered badge to a widget as example)
  • make those logs personalized, to help QA find logs that match their actions (store session_id, filter by it?)

I believe that mini-rake-profiler already has most of the building blocks to solve this. It seems that plugin could be build so far. I didn’t go deep into the code – so any tips before the dive, if you have them, would be appreciated.

I would also appreciate feedback on idea itself. I’ve been sitting on it for a while, didn’t share it with anyone. But it stuck with me for a while. If anyone has any critics, counter arguments or a tool that already achieves something similar – i’d be even happier.