sentry-ruby 7.0.0 → 7.2.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 +21 -9
- data/gemfiles/ruby-2.7_rack-3.1_redis-4.gemfile.lock +21 -9
- data/gemfiles/ruby-2.7_rack-3_redis-4.gemfile.lock +21 -9
- data/gemfiles/ruby-3.0_rack-2_redis-4.gemfile.lock +30 -14
- data/gemfiles/ruby-3.0_rack-3.1_redis-4.gemfile.lock +30 -14
- data/gemfiles/ruby-3.0_rack-3_redis-4.gemfile.lock +30 -14
- data/gemfiles/ruby-3.1_rack-2_redis-4.gemfile.lock +50 -27
- data/gemfiles/ruby-3.1_rack-3.1_redis-4.gemfile.lock +50 -27
- data/gemfiles/ruby-3.1_rack-3_redis-4.gemfile.lock +50 -27
- data/gemfiles/ruby-3.2_rack-0_redis-5.gemfile.lock +54 -31
- data/gemfiles/ruby-3.2_rack-2_redis-4.gemfile.lock +52 -29
- data/gemfiles/ruby-3.2_rack-2_redis-5.gemfile.lock +54 -31
- data/gemfiles/ruby-3.2_rack-3.1_redis-4.gemfile.lock +52 -29
- data/gemfiles/ruby-3.2_rack-3_redis-4.gemfile.lock +52 -29
- data/gemfiles/ruby-3.2_rack-3_redis-5.gemfile.lock +54 -31
- data/gemfiles/ruby-3.3_rack-2_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-3.3_rack-3.1_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-3.3_rack-3.1_redis-5.3.gemfile.lock +58 -35
- data/gemfiles/ruby-3.3_rack-3_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-3.4_rack-2_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-3.4_rack-3.1_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-3.4_rack-3.1_redis-5.3.gemfile.lock +58 -35
- data/gemfiles/ruby-3.4_rack-3_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-4.0_rack-2_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-4.0_rack-3.1_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-4.0_rack-3_redis-4.gemfile.lock +56 -33
- data/gemfiles/ruby-jruby-9.4.14.0_rack-2_redis-4.gemfile.lock +59 -41
- data/gemfiles/ruby-jruby-9.4.14.0_rack-3.1_redis-4.gemfile.lock +59 -41
- data/gemfiles/ruby-jruby-9.4.14.0_rack-3_redis-4.gemfile.lock +59 -41
- data/lib/sentry/backtrace.rb +10 -1
- data/lib/sentry/client.rb +19 -6
- data/lib/sentry/configuration.rb +8 -3
- 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/faraday.rb +4 -1
- data/lib/sentry/hub.rb +9 -2
- data/lib/sentry/integrable.rb +12 -0
- data/lib/sentry/log_event_buffer.rb +1 -1
- data/lib/sentry/metric_event.rb +4 -2
- data/lib/sentry/metric_event_buffer.rb +1 -1
- data/lib/sentry/metrics.rb +12 -6
- data/lib/sentry/rufus_scheduler.rb +120 -0
- data/lib/sentry/scope.rb +7 -3
- data/lib/sentry/session_flusher.rb +7 -0
- data/lib/sentry/std_lib_logger.rb +8 -2
- data/lib/sentry/telemetry_event_buffer.rb +57 -31
- data/lib/sentry/test_helper.rb +4 -0
- data/lib/sentry/threaded_periodic_worker.rb +90 -13
- data/lib/sentry/transaction.rb +7 -1
- data/lib/sentry/transport/debug_transport.rb +11 -2
- data/lib/sentry/transport/dummy_transport.rb +7 -4
- data/lib/sentry/transport/spotlight_transport.rb +2 -2
- data/lib/sentry/utils/callback_helper.rb +27 -0
- data/lib/sentry/version.rb +1 -1
- data/lib/sentry-ruby.rb +6 -0
- metadata +10 -6
|
@@ -6,7 +6,7 @@ GIT
|
|
|
6
6
|
PATH
|
|
7
7
|
remote: ..
|
|
8
8
|
specs:
|
|
9
|
-
sentry-ruby (
|
|
9
|
+
sentry-ruby (7.1.0)
|
|
10
10
|
bigdecimal
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
12
|
logger
|
|
@@ -14,23 +14,23 @@ 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)
|
|
@@ -48,61 +48,70 @@ GEM
|
|
|
48
48
|
benchmark-memory (0.1.2)
|
|
49
49
|
memory_profiler (~> 0.9)
|
|
50
50
|
benchmark_driver (0.16.5)
|
|
51
|
-
bigdecimal (4.1.
|
|
51
|
+
bigdecimal (4.1.3-java)
|
|
52
52
|
cgi (0.5.2-java)
|
|
53
53
|
concurrent-ruby (1.3.8)
|
|
54
54
|
connection_pool (2.5.5)
|
|
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.0)
|
|
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.13)
|
|
74
79
|
base64
|
|
75
80
|
fiber-storage
|
|
76
81
|
logger
|
|
77
82
|
hashdiff (1.2.1)
|
|
78
83
|
i18n (1.15.2)
|
|
79
84
|
concurrent-ruby (~> 1.0)
|
|
80
|
-
io-console (0.9.
|
|
85
|
+
io-console (0.9.4-java)
|
|
81
86
|
irb (1.18.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.
|
|
91
|
+
jar-dependencies (0.6.1-java)
|
|
87
92
|
jdbc-mysql (8.4.0.1)
|
|
88
93
|
jdbc-sqlite3 (3.46.1.1)
|
|
89
|
-
json (
|
|
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 (
|
|
106
|
+
prettyprint (0.2.1)
|
|
107
|
+
prism (2.0.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
112
|
puma (8.0.2-java)
|
|
105
113
|
nio4r (~> 2.0)
|
|
114
|
+
raabro (1.5.0)
|
|
106
115
|
rack (3.2.7)
|
|
107
116
|
rake (12.3.3)
|
|
108
117
|
rdoc (7.2.0)
|
|
@@ -128,8 +137,10 @@ GEM
|
|
|
128
137
|
rspec-retry (0.6.2)
|
|
129
138
|
rspec-core (> 3.3)
|
|
130
139
|
rspec-support (3.13.7)
|
|
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.109.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,11 +201,11 @@ 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.
|
|
208
|
+
activesupport (7.2.4) sha256=b97027b31e111675dba67b86edcd589acc25a0dddf8eecacca18d33a703a0788
|
|
196
209
|
addressable (2.9.0) sha256=7fdf6ac3660f7f4e867a0838be3f6cf722ace541dd97767fa42bc6cfa980c7af
|
|
197
210
|
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
198
211
|
benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c
|
|
@@ -200,40 +213,44 @@ CHECKSUMS
|
|
|
200
213
|
benchmark-ipsa (0.2.0) sha256=8be4820765d575691b2f91f6c988a8a3d90393239bf9d35ea53c8ab0fbca7230
|
|
201
214
|
benchmark-memory (0.1.2) sha256=aa7bfe6776174d0ddefe6fb39945d88fff6d76eac165690188391d9acd441c87
|
|
202
215
|
benchmark_driver (0.16.5) sha256=f675df0fe1de7e18e40df313ae24ebe4c7ee7814a4165f29a1a37b863a685831
|
|
203
|
-
bigdecimal (4.1.
|
|
216
|
+
bigdecimal (4.1.3-java) sha256=9a6a1fa67723a27ab1b3a6d5526322d8c82170af03199da7c915b8d9a1770532
|
|
204
217
|
cgi (0.5.2-java) sha256=08bbfe06e10e771d36f10db6c1dfb81727ea2a25c3dbcd28d890a1794414a73d
|
|
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.0) sha256=3be0eff0187ed913a1b4f679e9fcfe845b542cdd4f75b76cd6181a4ae1335fff
|
|
229
|
+
faraday-net_http (3.5.0) sha256=2e7094c34e38754ee048cc3df47376f8657005d9375f8473bce1c3b526a22e36
|
|
216
230
|
fiber-storage (1.0.1) sha256=f48e5b6d8b0be96dac486332b55cee82240057065dc761c1ea692b2e719240e1
|
|
217
|
-
|
|
231
|
+
fugit (1.14.0) sha256=e311a9cc85a54bb67649df45060e721282a1e2c8ebad40e41874a3a7d576f37e
|
|
232
|
+
graphql (2.6.13) sha256=8d3eafbc61767203e66be2eececc28900a3700be1f16706810820c1c2d24a187
|
|
218
233
|
hashdiff (1.2.1) sha256=9c079dbc513dfc8833ab59c0c2d8f230fa28499cc5efb4b8dd276cf931457cd1
|
|
219
234
|
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
220
|
-
io-console (0.9.
|
|
235
|
+
io-console (0.9.4-java) sha256=789188c38b937fc2d04400e35fd3b2838ffdf061e846571e51524036bc1bc185
|
|
221
236
|
irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
|
|
222
|
-
jar-dependencies (0.
|
|
237
|
+
jar-dependencies (0.6.1-java) sha256=2746643482d139fd9cecb524b57df63b71d9b5d734c7275171701201e3164f23
|
|
223
238
|
jdbc-mysql (8.4.0.1) sha256=429cb7999d11c4f46a7153a382b6ac07935a4c10ddc52dd98e2d52b22c17fa13
|
|
224
239
|
jdbc-sqlite3 (3.46.1.1) sha256=2498fea7d37c0d51c6bad1b95ffc909173c014ba6bd36825f37910113d0230cf
|
|
225
|
-
json (
|
|
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 (
|
|
248
|
+
prettyprint (0.2.1) sha256=d555d57ea6d7cf001d4774b693546a6bd88bec1e778ddffb5c60b68ceec4b7d4
|
|
249
|
+
prism (2.0.0) sha256=fd551446f0c6ca71455ef8d1d40bd2ca1538044834fa22df8837e5095f3a5a39
|
|
234
250
|
psych (5.5.0-java) sha256=3b7cf3684c44d049c3dee87ec4118ec9cd6ac714cbdcfba386997f96dbbd36ab
|
|
235
251
|
public_suffix (6.0.2) sha256=bfa7cd5108066f8c9602e0d6d4114999a5df5839a63149d3e8b0f9c1d3558394
|
|
236
252
|
puma (8.0.2-java) sha256=37392e0dbd01e2a157748b92b818bfacf801bb32628e41680e9ab1171dea2b3d
|
|
253
|
+
raabro (1.5.0) sha256=3f998a7bc84f9c84df3ab580634d2e0a5bda4f0841168d56035f529c9877440a
|
|
237
254
|
rack (3.2.7) sha256=93e13e1c24f93556671d85d2d79fa228c3485815c50d7e2f265b5330c6528fb7
|
|
238
255
|
rake (12.3.3) sha256=f7694adb4fe638da35452300cee6c545e9c377a0e3190018ac04d590b3c26ab3
|
|
239
256
|
rdoc (7.2.0) sha256=8650f76cd4009c3b54955eb5d7e3a075c60a57276766ebf36f9085e8c9f23192
|
|
@@ -246,9 +263,10 @@ CHECKSUMS
|
|
|
246
263
|
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
|
|
247
264
|
rspec-retry (0.6.2) sha256=6101ba23a38809811ae3484acde4ab481c54d846ac66d5037ccb40131a60d858
|
|
248
265
|
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
|
|
266
|
+
rufus-scheduler (3.9.2) sha256=55fa9e4db0ff69d7f38c804f17baba0c9bce5cba39984ae3c5cf6c039d1323b9
|
|
249
267
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
250
|
-
sentry-ruby (
|
|
251
|
-
sequel (5.
|
|
268
|
+
sentry-ruby (7.1.0)
|
|
269
|
+
sequel (5.109.0) sha256=e0d1d474442d620c8497d7f4851c0cc3a277920519051b8014b2877aa55efffe
|
|
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/backtrace.rb
CHANGED
|
@@ -7,6 +7,8 @@ require "sentry/backtrace/line"
|
|
|
7
7
|
module Sentry
|
|
8
8
|
# @api private
|
|
9
9
|
class Backtrace
|
|
10
|
+
extend CallbackHelper
|
|
11
|
+
|
|
10
12
|
# holder for an Array of Backtrace::Line instances
|
|
11
13
|
attr_reader :lines
|
|
12
14
|
|
|
@@ -15,7 +17,14 @@ module Sentry
|
|
|
15
17
|
def self.parse(backtrace, project_root, app_dirs_pattern, in_app_pattern: nil, &backtrace_cleanup_callback)
|
|
16
18
|
ruby_lines = backtrace.is_a?(Array) ? backtrace : backtrace.split(/\n\s*/)
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
if backtrace_cleanup_callback
|
|
21
|
+
ruby_lines = safe_dispatch_callback(
|
|
22
|
+
"backtrace_cleanup_callback",
|
|
23
|
+
backtrace_cleanup_callback,
|
|
24
|
+
[ruby_lines],
|
|
25
|
+
fallback: ruby_lines
|
|
26
|
+
)
|
|
27
|
+
end
|
|
19
28
|
|
|
20
29
|
# in_app_pattern is now passed in from StacktraceBuilder, so this regex won't be triggered
|
|
21
30
|
# only here for backwards compat and will be deleted
|
data/lib/sentry/client.rb
CHANGED
|
@@ -11,6 +11,7 @@ require "sentry/utils/encoding_helper"
|
|
|
11
11
|
module Sentry
|
|
12
12
|
class Client
|
|
13
13
|
include LoggingHelper
|
|
14
|
+
include CallbackHelper
|
|
14
15
|
|
|
15
16
|
# The Transport object that'll send events for the client.
|
|
16
17
|
# @return [Transport]
|
|
@@ -89,7 +90,7 @@ module Sentry
|
|
|
89
90
|
transport.record_lost_event(:queue_overflow, "span", num: spans_before + 1) if is_transaction
|
|
90
91
|
end
|
|
91
92
|
else
|
|
92
|
-
send_event(event, hint)
|
|
93
|
+
event = send_event(event, hint)
|
|
93
94
|
end
|
|
94
95
|
|
|
95
96
|
event
|
|
@@ -129,8 +130,8 @@ module Sentry
|
|
|
129
130
|
def flush
|
|
130
131
|
transport.flush if configuration.sending_to_dsn_allowed?
|
|
131
132
|
spotlight_transport.flush if spotlight_transport
|
|
132
|
-
@log_event_buffer
|
|
133
|
-
@metric_event_buffer
|
|
133
|
+
@log_event_buffer.flush
|
|
134
|
+
@metric_event_buffer.flush
|
|
134
135
|
end
|
|
135
136
|
|
|
136
137
|
# Initializes an Event object with the given exception. Returns `nil` if the exception's class is excluded from reporting.
|
|
@@ -237,7 +238,11 @@ module Sentry
|
|
|
237
238
|
spans_before = event.is_a?(TransactionEvent) ? event.spans.size : 0
|
|
238
239
|
|
|
239
240
|
if event.is_a?(ErrorEvent) && configuration.before_send
|
|
240
|
-
event =
|
|
241
|
+
event = safe_dispatch_callback(
|
|
242
|
+
"before_send",
|
|
243
|
+
configuration.before_send,
|
|
244
|
+
[event, hint]
|
|
245
|
+
)
|
|
241
246
|
|
|
242
247
|
if !event.is_a?(ErrorEvent)
|
|
243
248
|
# Avoid serializing the event object in this case because we aren't sure what it is and what it contains
|
|
@@ -250,7 +255,11 @@ module Sentry
|
|
|
250
255
|
end
|
|
251
256
|
|
|
252
257
|
if event.is_a?(TransactionEvent) && configuration.before_send_transaction
|
|
253
|
-
event =
|
|
258
|
+
event = safe_dispatch_callback(
|
|
259
|
+
"before_send_transaction",
|
|
260
|
+
configuration.before_send_transaction,
|
|
261
|
+
[event, hint]
|
|
262
|
+
)
|
|
254
263
|
|
|
255
264
|
if !event.is_a?(TransactionEvent)
|
|
256
265
|
# Avoid serializing the event object in this case because we aren't sure what it is and what it contains
|
|
@@ -268,7 +277,11 @@ module Sentry
|
|
|
268
277
|
end
|
|
269
278
|
|
|
270
279
|
if event.is_a?(CheckInEvent) && configuration.before_send_check_in
|
|
271
|
-
event =
|
|
280
|
+
event = safe_dispatch_callback(
|
|
281
|
+
"before_send_check_in",
|
|
282
|
+
configuration.before_send_check_in,
|
|
283
|
+
[event, hint]
|
|
284
|
+
)
|
|
272
285
|
|
|
273
286
|
if !event.is_a?(CheckInEvent)
|
|
274
287
|
# Avoid serializing the event object in this case because we aren't sure what it is and what it contains
|
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]
|
|
@@ -442,7 +447,7 @@ module Sentry
|
|
|
442
447
|
SERVER_PORT
|
|
443
448
|
].freeze
|
|
444
449
|
|
|
445
|
-
TRACE_IGNORE_STATUS_CODES_DEFAULT = [
|
|
450
|
+
TRACE_IGNORE_STATUS_CODES_DEFAULT = [301, (305..399), (401..404)]
|
|
446
451
|
|
|
447
452
|
HEROKU_DYNO_METADATA_MESSAGE = "You are running on Heroku but haven't enabled Dyno Metadata. For Sentry's "\
|
|
448
453
|
"release detection to work correctly, please run `heroku labs:enable runtime-dyno-metadata`"
|
|
@@ -832,7 +837,7 @@ module Sentry
|
|
|
832
837
|
project_root: @project_root.to_s,
|
|
833
838
|
app_dirs_pattern: @app_dirs_pattern,
|
|
834
839
|
linecache: @linecache,
|
|
835
|
-
context_lines: @
|
|
840
|
+
context_lines: @data_collection.frame_context_lines,
|
|
836
841
|
backtrace_cleanup_callback: @backtrace_cleanup_callback,
|
|
837
842
|
strip_backtrace_load_path: @strip_backtrace_load_path
|
|
838
843
|
)
|
|
@@ -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
|
data/lib/sentry/faraday.rb
CHANGED
|
@@ -14,10 +14,13 @@ module Sentry
|
|
|
14
14
|
|
|
15
15
|
# Ensure that we attach instrumentation only if the adapter is not net/http
|
|
16
16
|
# because if is is, then the net/http instrumentation will take care of it
|
|
17
|
-
if builder.adapter.name != "Faraday::Adapter::NetHttp"
|
|
17
|
+
if builder.adapter.name != "Faraday::Adapter::NetHttp" &&
|
|
18
|
+
!builder.locked? &&
|
|
19
|
+
!builder.instance_variable_defined?(:@sentry_patched)
|
|
18
20
|
# Make sure that it's going to be the first middleware so that it can capture
|
|
19
21
|
# the entire request processing involving other middlewares
|
|
20
22
|
builder.insert(0, ::Faraday::Request::Instrumentation, name: OP_NAME, instrumenter: Instrumenter.new)
|
|
23
|
+
builder.instance_variable_set(:@sentry_patched, true)
|
|
21
24
|
end
|
|
22
25
|
end
|
|
23
26
|
end
|
data/lib/sentry/hub.rb
CHANGED
|
@@ -7,6 +7,7 @@ require "sentry/session"
|
|
|
7
7
|
module Sentry
|
|
8
8
|
class Hub
|
|
9
9
|
include ArgumentCheckingHelper
|
|
10
|
+
include CallbackHelper
|
|
10
11
|
|
|
11
12
|
MUTEX = Mutex.new
|
|
12
13
|
|
|
@@ -240,8 +241,9 @@ module Sentry
|
|
|
240
241
|
# @param value [Numeric] the metric value
|
|
241
242
|
# @param unit [String, nil] (optional) the metric unit
|
|
242
243
|
# @param attributes [Hash, nil] (optional) additional attributes for the metric
|
|
244
|
+
# @param integration [String, Symbol, nil] (optional) registered integration emitting the metric
|
|
243
245
|
# @return [void]
|
|
244
|
-
def capture_metric(name:, type:, value:, unit: nil, attributes: nil)
|
|
246
|
+
def capture_metric(name:, type:, value:, unit: nil, attributes: nil, integration: nil)
|
|
245
247
|
return unless current_client
|
|
246
248
|
|
|
247
249
|
metric = MetricEvent.new(
|
|
@@ -250,6 +252,7 @@ module Sentry
|
|
|
250
252
|
type: type,
|
|
251
253
|
unit: unit,
|
|
252
254
|
attributes: attributes&.dup,
|
|
255
|
+
integration_meta: Sentry.integrations[integration.to_s]
|
|
253
256
|
)
|
|
254
257
|
|
|
255
258
|
current_client.buffer_metric_event(metric, current_scope)
|
|
@@ -294,7 +297,11 @@ module Sentry
|
|
|
294
297
|
return unless configuration.enabled_in_current_env?
|
|
295
298
|
|
|
296
299
|
if before_breadcrumb = current_client.configuration.before_breadcrumb
|
|
297
|
-
breadcrumb =
|
|
300
|
+
breadcrumb = safe_dispatch_callback(
|
|
301
|
+
"before_breadcrumb",
|
|
302
|
+
before_breadcrumb,
|
|
303
|
+
[breadcrumb, hint]
|
|
304
|
+
)
|
|
298
305
|
end
|
|
299
306
|
|
|
300
307
|
return unless breadcrumb
|