#108 Tracking Errors with Sentry
12-3-2017

Summary

Sentry is an Open Source error tracking that helps developers monitor and fix crashes in real time. Learn how to add and configure Sentry to your application.
3
rails error 7:44 min

Summary

Gemfilegem 'sentry-raven'
config/initializers/sentry.rbRaven.configure do |config|
  config.dsn = 'https://7e4ed0cd459a4368bcf12f319bdde289:[email protected]/253803'
  config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
  config.release = APP_VERSION
end
application_controller.rbclass ApplicationController < ActionController::Base
  protect_from_forgery with: :exception
  before_action :set_raven_context

  private

  def set_raven_context
    Raven.user_context(id: session[:current_user_id], foo: :bar)
    Raven.extra_context(params: params.to_unsafe_h, url: request.url)
  end
end
config/application.rbrequire_relative 'boot'

require 'rails/all'
require_relative 'version'

...