File tree 2 files changed +7
-2
lines changed
sentry-rails/lib/sentry/rails/tracing
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## Unreleased
2
+
3
+ ### Bug Fixes
4
+
5
+ - Don't instantiate connection in ` ActiveRecordSubscriber ` ([ #2278 ] ( https://github.com/getsentry/sentry-ruby/pull/2278 ) )
6
+
1
7
## 5.17.1
2
8
3
9
### Bug Fixes
Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ def self.subscribe!
21
21
span . set_data ( :connection_id , payload [ :connection_id ] )
22
22
23
23
# we fallback to the base connection on rails < 6.0.0 since the payload doesn't have it
24
- base_connection = ActiveRecord ::Base . connection
25
- connection ||= base_connection if payload [ :connection_id ] == base_connection . object_id
24
+ connection ||= ActiveRecord ::Base . connection_pool . connections . find { |conn | conn . object_id == payload [ :connection_id ] }
26
25
end
27
26
28
27
next unless connection
You can’t perform that action at this time.
0 commit comments