Clients
Services
Blog
Contact Us
Use uuid, X-Request-Id and tagged logging
Videos
/
Ruby on Rails Videos
/
Use uuid, X-Request-Id and tagged logging
Prev
Episode
Episode 7
of 7
Next
Episode
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