sentry-ruby 7.1.0 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/gemfiles/ruby-2.7_rack-2_redis-4.gemfile.lock +28 -16
- data/gemfiles/ruby-2.7_rack-3.1_redis-4.gemfile.lock +28 -16
- data/gemfiles/ruby-2.7_rack-3_redis-4.gemfile.lock +28 -16
- data/gemfiles/ruby-3.0_rack-2_redis-4.gemfile.lock +38 -22
- data/gemfiles/ruby-3.0_rack-3.1_redis-4.gemfile.lock +38 -22
- data/gemfiles/ruby-3.0_rack-3_redis-4.gemfile.lock +38 -22
- data/gemfiles/ruby-3.1_rack-2_redis-4.gemfile.lock +66 -43
- data/gemfiles/ruby-3.1_rack-3.1_redis-4.gemfile.lock +66 -43
- data/gemfiles/ruby-3.1_rack-3_redis-4.gemfile.lock +66 -43
- data/gemfiles/ruby-3.2_rack-0_redis-5.gemfile.lock +68 -45
- data/gemfiles/ruby-3.2_rack-2_redis-4.gemfile.lock +68 -45
- data/gemfiles/ruby-3.2_rack-2_redis-5.gemfile.lock +70 -47
- data/gemfiles/ruby-3.2_rack-3.1_redis-4.gemfile.lock +68 -45
- data/gemfiles/ruby-3.2_rack-3_redis-4.gemfile.lock +68 -45
- data/gemfiles/ruby-3.2_rack-3_redis-5.gemfile.lock +70 -47
- data/gemfiles/ruby-3.3_rack-2_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-3.3_rack-3.1_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-3.3_rack-3.1_redis-5.3.gemfile.lock +74 -52
- data/gemfiles/ruby-3.3_rack-3_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-3.4_rack-2_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-3.4_rack-3.1_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-3.4_rack-3.1_redis-5.3.gemfile.lock +74 -52
- data/gemfiles/ruby-3.4_rack-3_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-4.0_rack-2_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-4.0_rack-3.1_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-4.0_rack-3_redis-4.gemfile.lock +72 -50
- data/gemfiles/ruby-jruby-9.4.14.0_rack-2_redis-4.gemfile.lock +75 -57
- data/gemfiles/ruby-jruby-9.4.14.0_rack-3.1_redis-4.gemfile.lock +75 -57
- data/gemfiles/ruby-jruby-9.4.14.0_rack-3_redis-4.gemfile.lock +75 -57
- data/lib/sentry/configuration.rb +9 -28
- data/lib/sentry/cron/fugit_schedule.rb +117 -0
- data/lib/sentry/cron/monitor_check_ins.rb +33 -27
- data/lib/sentry/cron/slug.rb +18 -0
- data/lib/sentry/data_collection.rb +6 -1
- data/lib/sentry/debug_structured_logger.rb +18 -21
- data/lib/sentry/job_extensions/extension.rb +348 -0
- data/lib/sentry/propagation_context.rb +2 -0
- data/lib/sentry/redis.rb +7 -1
- data/lib/sentry/rufus_scheduler.rb +125 -0
- data/lib/sentry/scope.rb +39 -1
- data/lib/sentry/session_flusher.rb +5 -2
- data/lib/sentry/span.rb +25 -2
- data/lib/sentry/structured_logger.rb +16 -13
- data/lib/sentry/transport/debug_transport.rb +75 -15
- data/lib/sentry/transport/dummy_transport.rb +7 -4
- data/lib/sentry/transport/spotlight_transport.rb +2 -2
- data/lib/sentry/utils/latency.rb +18 -0
- data/lib/sentry/utils/ring_buffer.rb +38 -0
- data/lib/sentry/version.rb +1 -1
- data/lib/sentry-ruby.rb +15 -0
- metadata +12 -6
|
@@ -6,7 +6,7 @@ GIT
|
|
|
6
6
|
PATH
|
|
7
7
|
remote: ..
|
|
8
8
|
specs:
|
|
9
|
-
sentry-ruby (7.
|
|
9
|
+
sentry-ruby (7.2.0)
|
|
10
10
|
bigdecimal
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
12
|
logger
|
|
@@ -14,30 +14,30 @@ PATH
|
|
|
14
14
|
GEM
|
|
15
15
|
remote: https://rubygems.org/
|
|
16
16
|
specs:
|
|
17
|
-
activemodel (7.2.
|
|
18
|
-
activesupport (= 7.2.
|
|
19
|
-
activerecord (7.2.
|
|
20
|
-
activemodel (= 7.2.
|
|
21
|
-
activesupport (= 7.2.
|
|
17
|
+
activemodel (7.2.4)
|
|
18
|
+
activesupport (= 7.2.4)
|
|
19
|
+
activerecord (7.2.4)
|
|
20
|
+
activemodel (= 7.2.4)
|
|
21
|
+
activesupport (= 7.2.4)
|
|
22
22
|
timeout (>= 0.4.0)
|
|
23
23
|
activerecord-jdbc-adapter (72.1-java)
|
|
24
24
|
activerecord (~> 7.2.2)
|
|
25
25
|
activerecord-jdbcmysql-adapter (72.1-java)
|
|
26
26
|
activerecord-jdbc-adapter (= 72.1)
|
|
27
27
|
jdbc-mysql (>= 5.1.36, < 9)
|
|
28
|
-
activesupport (7.2.
|
|
28
|
+
activesupport (7.2.4)
|
|
29
29
|
base64
|
|
30
30
|
benchmark (>= 0.3)
|
|
31
31
|
bigdecimal
|
|
32
32
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
33
|
-
connection_pool (>= 2.2.5)
|
|
33
|
+
connection_pool (>= 2.2.5, < 3)
|
|
34
34
|
drb
|
|
35
35
|
i18n (>= 1.6, < 2)
|
|
36
36
|
logger (>= 1.4.2)
|
|
37
37
|
minitest (>= 5.1, < 6)
|
|
38
38
|
securerandom (>= 0.3)
|
|
39
39
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
40
|
-
addressable (2.9.
|
|
40
|
+
addressable (2.9.2)
|
|
41
41
|
public_suffix (>= 2.0.2, < 8.0)
|
|
42
42
|
base64 (0.3.0)
|
|
43
43
|
benchmark (0.5.0)
|
|
@@ -55,55 +55,64 @@ GEM
|
|
|
55
55
|
crack (1.0.1)
|
|
56
56
|
bigdecimal
|
|
57
57
|
rexml
|
|
58
|
-
date (3.
|
|
58
|
+
date (3.6.0-java)
|
|
59
59
|
diff-lcs (1.6.2)
|
|
60
60
|
docile (1.4.1)
|
|
61
61
|
drb (2.2.3)
|
|
62
62
|
erb (4.0.4.1-java)
|
|
63
63
|
cgi (>= 0.3.3)
|
|
64
|
+
et-orbi (1.4.2)
|
|
65
|
+
tzinfo
|
|
64
66
|
excon (1.6.0)
|
|
65
67
|
logger
|
|
66
|
-
faraday (2.
|
|
67
|
-
faraday-net_http (>= 2.0, < 3.
|
|
68
|
+
faraday (2.15.1)
|
|
69
|
+
faraday-net_http (>= 2.0, < 3.6)
|
|
68
70
|
json
|
|
69
71
|
logger
|
|
70
|
-
faraday-net_http (3.
|
|
72
|
+
faraday-net_http (3.5.0)
|
|
71
73
|
net-http (~> 0.5)
|
|
72
74
|
fiber-storage (1.0.1)
|
|
73
|
-
|
|
75
|
+
fugit (1.14.0)
|
|
76
|
+
et-orbi (~> 1.4)
|
|
77
|
+
raabro (~> 1.4)
|
|
78
|
+
graphql (2.6.15)
|
|
74
79
|
base64
|
|
75
80
|
fiber-storage
|
|
76
81
|
logger
|
|
77
|
-
hashdiff (1.2.
|
|
82
|
+
hashdiff (1.2.2)
|
|
78
83
|
i18n (1.15.2)
|
|
79
84
|
concurrent-ruby (~> 1.0)
|
|
80
|
-
io-console (0.9.
|
|
81
|
-
irb (1.
|
|
85
|
+
io-console (0.9.5-java)
|
|
86
|
+
irb (1.19.0)
|
|
82
87
|
pp (>= 0.6.0)
|
|
83
88
|
prism (>= 1.3.0)
|
|
84
89
|
rdoc (>= 4.0.0)
|
|
85
90
|
reline (>= 0.4.2)
|
|
86
|
-
jar-dependencies (0.6.
|
|
91
|
+
jar-dependencies (0.6.2-java)
|
|
87
92
|
jdbc-mysql (8.4.0.1)
|
|
88
93
|
jdbc-sqlite3 (3.46.1.1)
|
|
89
|
-
json (3.0
|
|
94
|
+
json (3.1.0-java)
|
|
90
95
|
logger (1.7.0)
|
|
91
96
|
memory_profiler (0.9.14)
|
|
92
97
|
minitest (5.27.0)
|
|
93
|
-
net-http (0.
|
|
98
|
+
net-http (0.10.0)
|
|
99
|
+
net-protocol (>= 0.3.0)
|
|
94
100
|
uri (>= 0.11.1)
|
|
101
|
+
net-protocol (0.4.0)
|
|
102
|
+
timeout
|
|
95
103
|
nio4r (2.7.5-java)
|
|
96
104
|
pp (0.6.4)
|
|
97
105
|
prettyprint
|
|
98
|
-
prettyprint (0.2.
|
|
99
|
-
prism (1.
|
|
106
|
+
prettyprint (0.2.1)
|
|
107
|
+
prism (2.1.0)
|
|
100
108
|
psych (5.5.0-java)
|
|
101
109
|
date
|
|
102
110
|
jar-dependencies (>= 0.1.7)
|
|
103
111
|
public_suffix (6.0.2)
|
|
104
|
-
puma (8.
|
|
112
|
+
puma (8.1.1-java)
|
|
105
113
|
nio4r (~> 2.0)
|
|
106
|
-
|
|
114
|
+
raabro (1.5.0)
|
|
115
|
+
rack (3.2.8)
|
|
107
116
|
rake (12.3.3)
|
|
108
117
|
rdoc (7.2.0)
|
|
109
118
|
erb
|
|
@@ -117,19 +126,21 @@ GEM
|
|
|
117
126
|
rspec-core (~> 3.13.0)
|
|
118
127
|
rspec-expectations (~> 3.13.0)
|
|
119
128
|
rspec-mocks (~> 3.13.0)
|
|
120
|
-
rspec-core (3.13.
|
|
129
|
+
rspec-core (3.13.7)
|
|
121
130
|
rspec-support (~> 3.13.0)
|
|
122
|
-
rspec-expectations (3.13.
|
|
131
|
+
rspec-expectations (3.13.6)
|
|
123
132
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
124
133
|
rspec-support (~> 3.13.0)
|
|
125
|
-
rspec-mocks (3.13.
|
|
134
|
+
rspec-mocks (3.13.9)
|
|
126
135
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
127
136
|
rspec-support (~> 3.13.0)
|
|
128
137
|
rspec-retry (0.6.2)
|
|
129
138
|
rspec-core (> 3.3)
|
|
130
|
-
rspec-support (3.13.
|
|
139
|
+
rspec-support (3.13.8)
|
|
140
|
+
rufus-scheduler (3.9.2)
|
|
141
|
+
fugit (~> 1.1, >= 1.11.1)
|
|
131
142
|
securerandom (0.4.1)
|
|
132
|
-
sequel (5.
|
|
143
|
+
sequel (5.110.0)
|
|
133
144
|
bigdecimal
|
|
134
145
|
simplecov (0.22.0)
|
|
135
146
|
docile (~> 1.1)
|
|
@@ -145,8 +156,8 @@ GEM
|
|
|
145
156
|
tsort (0.2.0)
|
|
146
157
|
tzinfo (2.0.6)
|
|
147
158
|
concurrent-ruby (~> 1.0)
|
|
148
|
-
uri (1.1.
|
|
149
|
-
webmock (3.
|
|
159
|
+
uri (1.1.2)
|
|
160
|
+
webmock (3.34.0)
|
|
150
161
|
addressable (>= 2.8.0)
|
|
151
162
|
crack (>= 0.3.2)
|
|
152
163
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -166,6 +177,7 @@ DEPENDENCIES
|
|
|
166
177
|
debug!
|
|
167
178
|
excon
|
|
168
179
|
faraday
|
|
180
|
+
fugit
|
|
169
181
|
graphql (>= 2.2.6)
|
|
170
182
|
irb
|
|
171
183
|
jar-dependencies
|
|
@@ -177,6 +189,7 @@ DEPENDENCIES
|
|
|
177
189
|
rexml (= 3.4.1)
|
|
178
190
|
rspec
|
|
179
191
|
rspec-retry
|
|
192
|
+
rufus-scheduler
|
|
180
193
|
sentry-ruby!
|
|
181
194
|
sequel
|
|
182
195
|
simplecov
|
|
@@ -188,12 +201,12 @@ DEPENDENCIES
|
|
|
188
201
|
yard
|
|
189
202
|
|
|
190
203
|
CHECKSUMS
|
|
191
|
-
activemodel (7.2.
|
|
192
|
-
activerecord (7.2.
|
|
204
|
+
activemodel (7.2.4) sha256=c6a2f2290fdf8728b596fba1fc528e65852c6e015ccc385ddf0f93c455588773
|
|
205
|
+
activerecord (7.2.4) sha256=b3549deb6a4c469e0cb652194cf566b6010f1f1796404b4213d8b47469d411e5
|
|
193
206
|
activerecord-jdbc-adapter (72.1-java) sha256=4487cb4606b5d76913b5abaaf681ef21b7aa9478ed201918f48da6b3f7fcec70
|
|
194
207
|
activerecord-jdbcmysql-adapter (72.1-java) sha256=094d6e074e23668dff143f5c69cda0f0fc29468d9634b3c5e5884a3345e3d166
|
|
195
|
-
activesupport (7.2.
|
|
196
|
-
addressable (2.9.
|
|
208
|
+
activesupport (7.2.4) sha256=b97027b31e111675dba67b86edcd589acc25a0dddf8eecacca18d33a703a0788
|
|
209
|
+
addressable (2.9.2) sha256=9117c7e7d6ee07230e75ce41fb9401ae55354dc654fcd0e862ba41d539e9a610
|
|
197
210
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
198
211
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
199
212
|
benchmark-ips (2.5.0) sha256=aa98e9dc420c0dc225f6bf8cea7f112ca015596868e9dcf2e15d4ee4e3eb80ee
|
|
@@ -205,50 +218,55 @@ CHECKSUMS
|
|
|
205
218
|
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
206
219
|
connection_pool (2.5.5) sha256=e54ff92855753df1fd7c59fa04a398833355f27dd14c074f8c83a05f72a716ad
|
|
207
220
|
crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e
|
|
208
|
-
date (3.
|
|
221
|
+
date (3.6.0-java) sha256=7276986bbacc2357d0c6d41a863be5906e2f745ea2ccb47eed84bf761f6a7806
|
|
209
222
|
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
210
223
|
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
|
|
211
224
|
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
212
225
|
erb (4.0.4.1-java) sha256=3e4805edebd25f48cdb43ad4ebf1d61c11538f29373f0a48716b688819e3f7ce
|
|
226
|
+
et-orbi (1.4.2) sha256=bb555dae668419cb24caa2a293a170e58be6d4df1e017c51f5030bdc133cd20c
|
|
213
227
|
excon (1.6.0) sha256=ebe2ab83c055ef8e117c62c91a3535b966a59a64868188219d49ab90cd83b65f
|
|
214
|
-
faraday (2.
|
|
215
|
-
faraday-net_http (3.
|
|
228
|
+
faraday (2.15.1) sha256=8708154deda739c5e86cc42b74960e23e8491fce0eba9e11639a6a34b1ac288f
|
|
229
|
+
faraday-net_http (3.5.0) sha256=2e7094c34e38754ee048cc3df47376f8657005d9375f8473bce1c3b526a22e36
|
|
216
230
|
fiber-storage (1.0.1) sha256=f48e5b6d8b0be96dac486332b55cee82240057065dc761c1ea692b2e719240e1
|
|
217
|
-
|
|
218
|
-
|
|
231
|
+
fugit (1.14.0) sha256=e311a9cc85a54bb67649df45060e721282a1e2c8ebad40e41874a3a7d576f37e
|
|
232
|
+
graphql (2.6.15) sha256=b978f938a0d169669d98ba591af28e6b96da65080429dfa4652cdb86bb9d9604
|
|
233
|
+
hashdiff (1.2.2) sha256=e2e287452b42f18d2a8d82dd48c435e214a81dbadccf49344b956842a3b9127f
|
|
219
234
|
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
220
|
-
io-console (0.9.
|
|
221
|
-
irb (1.
|
|
222
|
-
jar-dependencies (0.6.
|
|
235
|
+
io-console (0.9.5-java) sha256=34b74ec7d8e39a526fb9a82aa34853257a1baa08f56c5cd5d37ec6be2a5e6000
|
|
236
|
+
irb (1.19.0) sha256=55ee56acbdd6c9fe06a2e6909f46a24e5c41f45f16906bab04e8049cf46f1d27
|
|
237
|
+
jar-dependencies (0.6.2-java) sha256=3196d7c5b63a221e0593c260c449e3a36dbbde733ec34260109ebd50546cb8e5
|
|
223
238
|
jdbc-mysql (8.4.0.1) sha256=429cb7999d11c4f46a7153a382b6ac07935a4c10ddc52dd98e2d52b22c17fa13
|
|
224
239
|
jdbc-sqlite3 (3.46.1.1) sha256=2498fea7d37c0d51c6bad1b95ffc909173c014ba6bd36825f37910113d0230cf
|
|
225
|
-
json (3.0
|
|
240
|
+
json (3.1.0-java) sha256=5052301b8f7fa676608d9470da9cde02931a9824e02f462b635d07bf2fcc5bfc
|
|
226
241
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
227
242
|
memory_profiler (0.9.14) sha256=de558cf6525d8d56d2c0ea465b1664517fbe45560f892dc7a898d3b8c2863b12
|
|
228
243
|
minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
|
|
229
|
-
net-http (0.
|
|
244
|
+
net-http (0.10.0) sha256=1a2ff6e37a05724973c43f2bf7bf105f59c36a4cd0a7e9b1c021a0a566987c27
|
|
245
|
+
net-protocol (0.4.0) sha256=f9f90c8c6f64794a45160bf422177a336db12809de3beeeaa26b88fcd2e8c853
|
|
230
246
|
nio4r (2.7.5-java) sha256=d14779d2a9b012ec0148a53344fbb2ed2a3c4d90c5dd923bf281135ab983b2c9
|
|
231
247
|
pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
|
|
232
|
-
prettyprint (0.2.
|
|
233
|
-
prism (1.
|
|
248
|
+
prettyprint (0.2.1) sha256=d555d57ea6d7cf001d4774b693546a6bd88bec1e778ddffb5c60b68ceec4b7d4
|
|
249
|
+
prism (2.1.0) sha256=1c0a7c6dea0e93183390fb123f007564dbe663198e2f86ad87204151147601f3
|
|
234
250
|
psych (5.5.0-java) sha256=3b7cf3684c44d049c3dee87ec4118ec9cd6ac714cbdcfba386997f96dbbd36ab
|
|
235
251
|
public_suffix (6.0.2) sha256=bfa7cd5108066f8c9602e0d6d4114999a5df5839a63149d3e8b0f9c1d3558394
|
|
236
|
-
puma (8.
|
|
237
|
-
|
|
252
|
+
puma (8.1.1-java) sha256=1ea716d494a73dce87478096ac5b3cf3ad9d3b063a0280b0c74f3a73d03ab37c
|
|
253
|
+
raabro (1.5.0) sha256=3f998a7bc84f9c84df3ab580634d2e0a5bda4f0841168d56035f529c9877440a
|
|
254
|
+
rack (3.2.8) sha256=1fecc85e463ebc7a2a945fff829ffcd549babeb1556384796fad946c28dc4ec7
|
|
238
255
|
rake (12.3.3) sha256=f7694adb4fe638da35452300cee6c545e9c377a0e3190018ac04d590b3c26ab3
|
|
239
256
|
rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192
|
|
240
257
|
redis (4.8.1) sha256=387ee086694fffc9632aaeb1efe4a7b1627ca783bf373320346a8a20cd93333a
|
|
241
258
|
reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
|
|
242
259
|
rexml (3.4.1) sha256=c74527a9a0a04b4ec31dbe0dc4ed6004b960af943d8db42e539edde3a871abca
|
|
243
260
|
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
|
|
244
|
-
rspec-core (3.13.
|
|
245
|
-
rspec-expectations (3.13.
|
|
246
|
-
rspec-mocks (3.13.
|
|
261
|
+
rspec-core (3.13.7) sha256=c64ff16d9788119805cbc6a3f4b6d87cc22417c2d25976a3330de136896b5469
|
|
262
|
+
rspec-expectations (3.13.6) sha256=bf538ca6d367ff5b0d85a87fdb5c0c6038f2cd1308a0eeba07476caa02d22f35
|
|
263
|
+
rspec-mocks (3.13.9) sha256=ea5c7ff3054a6098ca6039aacef80aec69d5a8a3ef80be8fc88337359b672a30
|
|
247
264
|
rspec-retry (0.6.2) sha256=6101ba23a38809811ae3484acde4ab481c54d846ac66d5037ccb40131a60d858
|
|
248
|
-
rspec-support (3.13.
|
|
265
|
+
rspec-support (3.13.8) sha256=e4160030309b7e3e9d9863dfe720a35dfcc577162f5402cd68fc8c5258a0ffd6
|
|
266
|
+
rufus-scheduler (3.9.2) sha256=55fa9e4db0ff69d7f38c804f17baba0c9bce5cba39984ae3c5cf6c039d1323b9
|
|
249
267
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
250
|
-
sentry-ruby (7.
|
|
251
|
-
sequel (5.
|
|
268
|
+
sentry-ruby (7.2.0)
|
|
269
|
+
sequel (5.110.0) sha256=c316335b352adb4109bb02ade237b1a6dbd493493def34542ce05893f62138ae
|
|
252
270
|
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
|
|
253
271
|
simplecov-cobertura (3.2.0) sha256=70d702658677fcb20e5aceb6915ccf8bc62ff2ccd38b62b3ad5c9db5c0888740
|
|
254
272
|
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
|
|
@@ -257,8 +275,8 @@ CHECKSUMS
|
|
|
257
275
|
timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
|
|
258
276
|
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
259
277
|
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
260
|
-
uri (1.1.
|
|
261
|
-
webmock (3.
|
|
278
|
+
uri (1.1.2) sha256=89292e98eabbef6248b0a0ed5e7e398e152f83f17560023a6d94a7f492b169fb
|
|
279
|
+
webmock (3.34.0) sha256=72eed29dc8c00148d592acaedaaa6b869e2e397de57dfc8602b84aa834f46b33
|
|
262
280
|
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
|
|
263
281
|
yard (0.9.45) sha256=52e211493f7cb8a3ebf7e104a25a1e73937a3103092545d34cb88fafebb3dc51
|
|
264
282
|
|
data/lib/sentry/configuration.rb
CHANGED
|
@@ -135,7 +135,12 @@ module Sentry
|
|
|
135
135
|
# Number of lines of code context to capture, or nil for none
|
|
136
136
|
# @deprecated Use {#data_collection} and `frame_context_lines` instead.
|
|
137
137
|
# @return [Integer, nil]
|
|
138
|
-
|
|
138
|
+
attr_reader :context_lines
|
|
139
|
+
|
|
140
|
+
def context_lines=(value)
|
|
141
|
+
@context_lines = value
|
|
142
|
+
@data_collection.backfill_frame_context_lines(self)
|
|
143
|
+
end
|
|
139
144
|
|
|
140
145
|
# RACK_ENV by default.
|
|
141
146
|
# @return [String]
|
|
@@ -416,7 +421,7 @@ module Sentry
|
|
|
416
421
|
|
|
417
422
|
# these are not config options
|
|
418
423
|
# @!visibility private
|
|
419
|
-
attr_reader :
|
|
424
|
+
attr_reader :gem_specs
|
|
420
425
|
|
|
421
426
|
# These exceptions could enter Puma's `lowlevel_error_handler` callback and the SDK's Puma integration
|
|
422
427
|
# But they are mostly considered as noise and should be ignored by default
|
|
@@ -759,9 +764,7 @@ module Sentry
|
|
|
759
764
|
end
|
|
760
765
|
|
|
761
766
|
def sending_to_dsn_allowed?
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
valid? && capture_in_environment?
|
|
767
|
+
!!@dsn&.valid? && enabled_in_current_env?
|
|
765
768
|
end
|
|
766
769
|
|
|
767
770
|
def sample_allowed?
|
|
@@ -832,7 +835,7 @@ module Sentry
|
|
|
832
835
|
project_root: @project_root.to_s,
|
|
833
836
|
app_dirs_pattern: @app_dirs_pattern,
|
|
834
837
|
linecache: @linecache,
|
|
835
|
-
context_lines: @
|
|
838
|
+
context_lines: @data_collection.frame_context_lines,
|
|
836
839
|
backtrace_cleanup_callback: @backtrace_cleanup_callback,
|
|
837
840
|
strip_backtrace_load_path: @strip_backtrace_load_path
|
|
838
841
|
)
|
|
@@ -851,12 +854,6 @@ module Sentry
|
|
|
851
854
|
log_error("Error detecting release", e, debug: debug)
|
|
852
855
|
end
|
|
853
856
|
|
|
854
|
-
# @api private
|
|
855
|
-
def error_messages
|
|
856
|
-
@errors = [@errors[0]] + @errors[1..-1].map(&:downcase) # fix case of all but first
|
|
857
|
-
@errors.join(", ")
|
|
858
|
-
end
|
|
859
|
-
|
|
860
857
|
# @api private
|
|
861
858
|
def run_after_close_callbacks
|
|
862
859
|
run_callbacks(:after, :closed)
|
|
@@ -903,22 +900,6 @@ module Sentry
|
|
|
903
900
|
nil
|
|
904
901
|
end
|
|
905
902
|
|
|
906
|
-
def capture_in_environment?
|
|
907
|
-
return true if enabled_in_current_env?
|
|
908
|
-
|
|
909
|
-
@errors << "Not configured to send/capture in environment '#{environment}'"
|
|
910
|
-
false
|
|
911
|
-
end
|
|
912
|
-
|
|
913
|
-
def valid?
|
|
914
|
-
if @dsn&.valid?
|
|
915
|
-
true
|
|
916
|
-
else
|
|
917
|
-
@errors << "DSN not set or not valid"
|
|
918
|
-
false
|
|
919
|
-
end
|
|
920
|
-
end
|
|
921
|
-
|
|
922
903
|
def environment_from_env
|
|
923
904
|
ENV["SENTRY_CURRENT_ENV"] || ENV["SENTRY_ENVIRONMENT"] || ENV["RAILS_ENV"] || ENV["RACK_ENV"] || "development"
|
|
924
905
|
end
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentry
|
|
4
|
+
module Cron
|
|
5
|
+
# Converts fugit schedules into monitor configs. Returns nil when the
|
|
6
|
+
# schedule can't be expressed in the Crons schedule format.
|
|
7
|
+
module FugitSchedule
|
|
8
|
+
# `#n` and `#-1` (last) have Crons equivalents; other `#-n` don't.
|
|
9
|
+
WEEKDAY_HASHES = [1, 2, 3, 4, 5, -1].freeze
|
|
10
|
+
# et-orbi names offset zones like "+05:00".
|
|
11
|
+
OFFSET = /\A([+-]\d{1,2}):?(\d{2})?\z/.freeze
|
|
12
|
+
|
|
13
|
+
class << self
|
|
14
|
+
def from_cron(cron)
|
|
15
|
+
crontab = crontab_for(cron)
|
|
16
|
+
timezone = timezone_for(cron) if crontab
|
|
17
|
+
MonitorConfig.from_crontab(crontab, timezone: timezone, **options) if timezone
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def from_seconds(seconds)
|
|
21
|
+
seconds = seconds.to_f
|
|
22
|
+
return unless seconds > 0 && (seconds % 60).zero?
|
|
23
|
+
|
|
24
|
+
seconds = seconds.to_i
|
|
25
|
+
if (seconds % 86_400).zero?
|
|
26
|
+
MonitorConfig.from_interval(seconds / 86_400, :day, **options)
|
|
27
|
+
elsif (seconds % 3_600).zero?
|
|
28
|
+
MonitorConfig.from_interval(seconds / 3_600, :hour, **options)
|
|
29
|
+
else
|
|
30
|
+
MonitorConfig.from_interval(seconds / 60, :minute, **options)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
private
|
|
35
|
+
|
|
36
|
+
def options
|
|
37
|
+
cron_config = Sentry.configuration.cron
|
|
38
|
+
{ checkin_margin: cron_config.default_checkin_margin, max_runtime: cron_config.default_max_runtime }
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Rebuilds a 5-field crontab from fugit's expanded fields. Returns nil for
|
|
42
|
+
# sub-minute seconds, `%`, `&`, and negative days other than `L` and `#-1`.
|
|
43
|
+
def crontab_for(cron)
|
|
44
|
+
return unless defined?(::Fugit::Cron) && cron.is_a?(::Fugit::Cron)
|
|
45
|
+
return unless cron.seconds&.size == 1
|
|
46
|
+
return if cron.monthdays && cron.weekdays && cron.instance_variable_get(:@day_and)
|
|
47
|
+
|
|
48
|
+
monthdays = monthday_field(cron.monthdays)
|
|
49
|
+
weekdays = weekday_field(cron.weekdays)
|
|
50
|
+
return unless monthdays && weekdays
|
|
51
|
+
|
|
52
|
+
[
|
|
53
|
+
crontab_field(cron.minutes, 0, 59, step: true),
|
|
54
|
+
crontab_field(cron.hours, 0, 23, step: true),
|
|
55
|
+
monthdays,
|
|
56
|
+
crontab_field(cron.months, 1, 12, step: true),
|
|
57
|
+
weekdays
|
|
58
|
+
].join(" ")
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Day fields never use `*/n`: Debian cron treats a field starting with
|
|
62
|
+
# `*` as unrestricted when combining day-of-month and weekday.
|
|
63
|
+
def monthday_field(monthdays)
|
|
64
|
+
return "*" unless monthdays
|
|
65
|
+
|
|
66
|
+
last, days = monthdays.partition(&:negative?)
|
|
67
|
+
return unless last.all? { |day| day == -1 }
|
|
68
|
+
|
|
69
|
+
fields = days.empty? ? [] : [crontab_field(days, 1, 31)]
|
|
70
|
+
fields << "L" unless last.empty?
|
|
71
|
+
fields.join(",")
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def weekday_field(weekdays)
|
|
75
|
+
return "*" unless weekdays
|
|
76
|
+
|
|
77
|
+
days, hashed = weekdays.partition { |day| day.size == 1 }
|
|
78
|
+
return unless hashed.all? { |_, hash| WEEKDAY_HASHES.include?(hash) }
|
|
79
|
+
|
|
80
|
+
fields = days.empty? ? [] : [crontab_field(days.map(&:first), 0, 6)]
|
|
81
|
+
hashed.each { |day, hash| fields << (hash == -1 ? "#{day}L" : "#{day}##{hash}") }
|
|
82
|
+
fields.join(",")
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def crontab_field(values, min, max, step: false)
|
|
86
|
+
return "*" unless values
|
|
87
|
+
|
|
88
|
+
if step && values.size > 1 && values.first == min
|
|
89
|
+
increment = values[1] - values[0]
|
|
90
|
+
return "*/#{increment}" if values == min.step(max, increment).to_a
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
values.chunk_while { |a, b| b == a + 1 }.map { |run| run.size > 1 ? "#{run.first}-#{run.last}" : run.first.to_s }.join(",")
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Sentry only accepts IANA names, so only whole-hour offsets get a zone.
|
|
97
|
+
def timezone_for(cron)
|
|
98
|
+
zone = cron.timezone || ::EtOrbi.determine_local_tzone
|
|
99
|
+
return Sentry.configuration.cron.default_timezone unless zone
|
|
100
|
+
|
|
101
|
+
offset = OFFSET.match(zone.name)
|
|
102
|
+
offset ? offset_timezone(offset[1].to_i, offset[2].to_i) : ::TZInfo::Timezone.get(zone.name).identifier
|
|
103
|
+
rescue StandardError
|
|
104
|
+
nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def offset_timezone(hours, minutes)
|
|
108
|
+
return unless minutes.zero? && hours.between?(-12, 14)
|
|
109
|
+
return "Etc/UTC" if hours.zero?
|
|
110
|
+
|
|
111
|
+
# Etc/GMT signs are inverted: UTC+5 is Etc/GMT-5.
|
|
112
|
+
"Etc/GMT#{hours.positive? ? "-" : "+"}#{hours.abs}"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
@@ -5,39 +5,45 @@ module Sentry
|
|
|
5
5
|
module MonitorCheckIns
|
|
6
6
|
MAX_SLUG_LENGTH = 50
|
|
7
7
|
|
|
8
|
+
def self.with_check_in(slug, monitor_config: nil)
|
|
9
|
+
check_in_id = Sentry.capture_check_in(slug,
|
|
10
|
+
:in_progress,
|
|
11
|
+
monitor_config: monitor_config)
|
|
12
|
+
|
|
13
|
+
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
14
|
+
|
|
15
|
+
begin
|
|
16
|
+
ret = yield
|
|
17
|
+
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
|
18
|
+
|
|
19
|
+
Sentry.capture_check_in(slug,
|
|
20
|
+
:ok,
|
|
21
|
+
check_in_id: check_in_id,
|
|
22
|
+
duration: duration,
|
|
23
|
+
monitor_config: monitor_config)
|
|
24
|
+
|
|
25
|
+
ret
|
|
26
|
+
rescue Exception
|
|
27
|
+
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
|
28
|
+
|
|
29
|
+
Sentry.capture_check_in(slug,
|
|
30
|
+
:error,
|
|
31
|
+
check_in_id: check_in_id,
|
|
32
|
+
duration: duration,
|
|
33
|
+
monitor_config: monitor_config)
|
|
34
|
+
|
|
35
|
+
raise
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
8
39
|
module Patch
|
|
9
40
|
def perform(*args, **opts)
|
|
10
41
|
slug = self.class.sentry_monitor_slug
|
|
11
42
|
monitor_config = self.class.sentry_monitor_config
|
|
12
43
|
|
|
13
|
-
|
|
14
|
-
:in_progress,
|
|
15
|
-
monitor_config: monitor_config)
|
|
16
|
-
|
|
17
|
-
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
18
|
-
|
|
19
|
-
begin
|
|
44
|
+
MonitorCheckIns.with_check_in(slug, monitor_config: monitor_config) do
|
|
20
45
|
# need to do this on ruby <= 2.6 sadly
|
|
21
|
-
|
|
22
|
-
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
|
23
|
-
|
|
24
|
-
Sentry.capture_check_in(slug,
|
|
25
|
-
:ok,
|
|
26
|
-
check_in_id: check_in_id,
|
|
27
|
-
duration: duration,
|
|
28
|
-
monitor_config: monitor_config)
|
|
29
|
-
|
|
30
|
-
ret
|
|
31
|
-
rescue Exception
|
|
32
|
-
duration = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
|
33
|
-
|
|
34
|
-
Sentry.capture_check_in(slug,
|
|
35
|
-
:error,
|
|
36
|
-
check_in_id: check_in_id,
|
|
37
|
-
duration: duration,
|
|
38
|
-
monitor_config: monitor_config)
|
|
39
|
-
|
|
40
|
-
raise
|
|
46
|
+
method(:perform).super_method.arity == 0 ? super() : super
|
|
41
47
|
end
|
|
42
48
|
end
|
|
43
49
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentry
|
|
4
|
+
module Cron
|
|
5
|
+
module Slug
|
|
6
|
+
module_function
|
|
7
|
+
|
|
8
|
+
# Returns nil when nothing usable is left.
|
|
9
|
+
def from(name)
|
|
10
|
+
slug = name.to_s.downcase.gsub(/[^a-z0-9_-]+/, "-").sub(/\A-+/, "")
|
|
11
|
+
slug = slug[0, MonitorCheckIns::MAX_SLUG_LENGTH]
|
|
12
|
+
# rindex instead of /-+\z/, which backtracks on long runs of dashes.
|
|
13
|
+
last = slug.rindex(/[^-]/)
|
|
14
|
+
last && slug[0..last]
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -131,6 +131,7 @@ module Sentry
|
|
|
131
131
|
def self.backfill(configuration)
|
|
132
132
|
data_collection = new
|
|
133
133
|
data_collection.backfill_stack_frame_variables(configuration)
|
|
134
|
+
data_collection.backfill_frame_context_lines(configuration)
|
|
134
135
|
return data_collection if configuration.send_default_pii
|
|
135
136
|
|
|
136
137
|
# TODO-neel-data map to exact ruby behaviour for backwards compat behavior
|
|
@@ -146,7 +147,6 @@ module Sentry
|
|
|
146
147
|
data_collection.graphql.variables = false
|
|
147
148
|
data_collection.database_query_data = false
|
|
148
149
|
data_collection.queues = false
|
|
149
|
-
data_collection.frame_context_lines = configuration.context_lines
|
|
150
150
|
data_collection
|
|
151
151
|
end
|
|
152
152
|
|
|
@@ -171,6 +171,11 @@ module Sentry
|
|
|
171
171
|
self.stack_frame_variables = configuration.include_local_variables
|
|
172
172
|
end
|
|
173
173
|
|
|
174
|
+
# Copies the legacy context_lines configuration.
|
|
175
|
+
def backfill_frame_context_lines(configuration)
|
|
176
|
+
self.frame_context_lines = configuration.context_lines
|
|
177
|
+
end
|
|
178
|
+
|
|
174
179
|
# Returns whether stack frame local variables should be captured.
|
|
175
180
|
def collect_stack_frame_variables?
|
|
176
181
|
stack_frame_variables.mode != :off
|