Sha256: d3015186fba575d824dbc9e633890c1b3ca357e8ea390759c7fc27dd3381497a
Contents?: true
Size: 838 Bytes
Versions: 82
Compression:
Stored size: 838 Bytes
Contents
require "active_support/backtrace_cleaner" require "active_support/core_ext/string/access" module Sentry module Rails class BacktraceCleaner < ActiveSupport::BacktraceCleaner APP_DIRS_PATTERN = /\A(?:\.\/)?(?:app|config|lib|test|\(\w*\))/.freeze RENDER_TEMPLATE_PATTERN = /:in `.*_\w+_{2,3}\d+_\d+'/.freeze def initialize super # we don't want any default silencers because they're too aggressive remove_silencers! @root = "#{Sentry.configuration.project_root}/" add_filter do |line| line.start_with?(@root) ? line.from(@root.size) : line end add_filter do |line| if line =~ RENDER_TEMPLATE_PATTERN line.sub(RENDER_TEMPLATE_PATTERN, "") else line end end end end end end
Version data entries
82 entries across 82 versions & 1 rubygems