Use uuid, X-Request-Id and tagged logging

Videos/Ruby on Rails Videos/Use uuid, X-Request-Id and tagged logging

Episode Notes

  • Use uuid and tagged logging to debug Rails application.
  • Rails commit
  • #config/intializers/tagged_logging.rb Wheel::Application.config.log_tags = [ :subdomain, :uuid ] #app/controllers/application_controller.rb before_action :set_honeybadger_context def set_honeybadger_context hash = { uuid: request.uuid } if current_user hash.merge!({ user_id: current_user.id, user_email: current_user.email }) end Honeybadger.context hash end