File tree Expand file tree Collapse file tree 5 files changed +40
-66
lines changed Expand file tree Collapse file tree 5 files changed +40
-66
lines changed Original file line number Diff line number Diff line change @@ -134,10 +134,16 @@ group :development do
134
134
gem 'rack-mini-profiler'
135
135
gem 'memory_profiler'
136
136
gem 'flamegraph'
137
- gem 'stackprof'
138
137
gem 'bundler-audit'
139
138
end
140
139
140
+ group :development , :production do
141
+ # Profiling / error tracking
142
+ gem "stackprof"
143
+ gem "sentry-ruby"
144
+ gem "sentry-rails"
145
+ end
146
+
141
147
group :worker do
142
148
# These gems are only used in workers (and just so happen to slow down app startup
143
149
# by quite a bit), so we exclude them from all groups other than RAILS_GROUPS=worker.
Original file line number Diff line number Diff line change @@ -1270,6 +1270,7 @@ GEM
1270
1270
multi_json (~> 1 )
1271
1271
statsd-ruby (~> 1.1 )
1272
1272
bcrypt (3.1.18 )
1273
+ bigdecimal (3.1.9 )
1273
1274
bindex (0.8.1 )
1274
1275
binding_of_caller (1.0.0 )
1275
1276
debug_inspector (>= 0.0.1 )
@@ -1475,7 +1476,6 @@ GEM
1475
1476
net-smtp (0.3.3 )
1476
1477
net-protocol
1477
1478
netrc (0.11.0 )
1478
- newrelic_rpm (9.2.0 )
1479
1479
nio4r (2.5.9 )
1480
1480
nokogiri (1.16.6 )
1481
1481
mini_portile2 (~> 2.8.2 )
@@ -1616,6 +1616,12 @@ GEM
1616
1616
rubyzip (>= 1.2.2 , < 3.0 )
1617
1617
websocket (~> 1.0 )
1618
1618
semantic_range (3.0.0 )
1619
+ sentry-rails (5.23.0 )
1620
+ railties (>= 5.0 )
1621
+ sentry-ruby (~> 5.23.0 )
1622
+ sentry-ruby (5.23.0 )
1623
+ bigdecimal
1624
+ concurrent-ruby (~> 1.0 , >= 1.0.2 )
1619
1625
sidekiq (6.5.5 )
1620
1626
connection_pool (>= 2.2.2 )
1621
1627
rack (~> 2.0 )
@@ -1733,7 +1739,6 @@ DEPENDENCIES
1733
1739
memory_profiler
1734
1740
meta-tags
1735
1741
mini_racer (~> 0.6.3 )
1736
- newrelic_rpm
1737
1742
onebox !
1738
1743
paperclip
1739
1744
paranoia
@@ -1754,6 +1759,8 @@ DEPENDENCIES
1754
1759
rmagick
1755
1760
sass-rails
1756
1761
selenium-webdriver
1762
+ sentry-rails
1763
+ sentry-ruby
1757
1764
serendipitous !
1758
1765
sidekiq
1759
1766
slack-notifier
Original file line number Diff line number Diff line change 2
2
< html lang ="en ">
3
3
< head >
4
4
<%= render 'layouts/common_head' %>
5
- </ head >
5
+ <%= Sentry . get_trace_propagation_meta . html_safe %>
6
+ </ head >
6
7
< body data-in-app ="true "
7
8
class ="<%= controller_name %> <%= action_name %> <%= 'has-fixed-sidenav' if user_signed_in? %> <%= 'dark' if user_signed_in? && current_user . dark_mode_enabled? %> "
8
9
>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ Sentry . init do |config |
2
+ config . dsn = ENV [ 'SENTRY_DSN' ]
3
+ config . breadcrumbs_logger = [ :active_support_logger , :http_logger ]
4
+
5
+ # Add data like request headers and IP for users,
6
+ # see https://docs.sentry.io/platforms/ruby/data-management/data-collected/ for more info
7
+ config . send_default_pii = true
8
+
9
+ # Set traces_sample_rate to 1.0 to capture 100%
10
+ # of transactions for tracing.
11
+ # We recommend adjusting this value in production.
12
+ config . traces_sample_rate = 1.0
13
+ # or
14
+ config . traces_sampler = lambda do |context |
15
+ true
16
+ end
17
+ # Set profiles_sample_rate to profile 100%
18
+ # of sampled transactions.
19
+ # We recommend adjusting this value in production.
20
+ config . profiles_sample_rate = 1.0
21
+ end
22
+ # frozen_string_literal: true
You can’t perform that action at this time.
0 commit comments