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
|
@@ -8,22 +8,25 @@ module Sentry
|
|
|
8
8
|
super
|
|
9
9
|
@events = []
|
|
10
10
|
@envelopes = []
|
|
11
|
+
@mutex = Mutex.new
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def send_event(event)
|
|
14
|
-
@events << event
|
|
15
|
+
@mutex.synchronize { @events << event }
|
|
15
16
|
super
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
def send_envelope(envelope)
|
|
19
|
-
@envelopes << envelope
|
|
20
|
+
@mutex.synchronize { @envelopes << envelope }
|
|
20
21
|
end
|
|
21
22
|
|
|
22
23
|
# Empties the captured events and envelopes so `TestHelper.clear_sentry_events`
|
|
23
24
|
# also clears the dummy transport instance
|
|
24
25
|
def clear
|
|
25
|
-
@
|
|
26
|
-
|
|
26
|
+
@mutex.synchronize do
|
|
27
|
+
@events.clear
|
|
28
|
+
@envelopes.clear
|
|
29
|
+
end
|
|
27
30
|
end
|
|
28
31
|
end
|
|
29
32
|
end
|
|
@@ -39,11 +39,11 @@ module Sentry
|
|
|
39
39
|
@failed += 1
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# Similar to HTTPTransport connection, but does not support Proxy
|
|
42
|
+
# Similar to HTTPTransport connection, but does not support Proxy
|
|
43
43
|
def conn
|
|
44
44
|
sidecar = URI(@sidecar_url)
|
|
45
45
|
connection = ::Net::HTTP.new(sidecar.hostname, sidecar.port, nil)
|
|
46
|
-
connection.use_ssl =
|
|
46
|
+
connection.use_ssl = sidecar.scheme == "https"
|
|
47
47
|
connection
|
|
48
48
|
end
|
|
49
49
|
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Sentry
|
|
4
|
+
# @private
|
|
5
|
+
module CallbackHelper
|
|
6
|
+
# @!visibility private
|
|
7
|
+
def safe_dispatch_callback(callback_name, callback, args, fallback: nil)
|
|
8
|
+
callback.call(*args)
|
|
9
|
+
rescue => e
|
|
10
|
+
log_callback_error(callback_name, e)
|
|
11
|
+
fallback
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def log_callback_error(callback_name, exception)
|
|
17
|
+
return unless Sentry.initialized?
|
|
18
|
+
|
|
19
|
+
message = "Error in #{callback_name} callback: #{exception.message}"
|
|
20
|
+
message += "\n#{exception.backtrace.join("\n")}" if Sentry.configuration.debug && exception.backtrace
|
|
21
|
+
|
|
22
|
+
Sentry.sdk_logger.error(LOGGER_PROGNAME) { message }
|
|
23
|
+
rescue StandardError
|
|
24
|
+
# Callback error reporting must not propagate to the application.
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/sentry/version.rb
CHANGED
data/lib/sentry-ruby.rb
CHANGED
|
@@ -10,6 +10,7 @@ require "sentry/core_ext/object/deep_dup"
|
|
|
10
10
|
require "sentry/utils/argument_checking_helper"
|
|
11
11
|
require "sentry/utils/encoding_helper"
|
|
12
12
|
require "sentry/utils/logging_helper"
|
|
13
|
+
require "sentry/utils/callback_helper"
|
|
13
14
|
require "sentry/utils/sample_rand"
|
|
14
15
|
require "sentry/configuration"
|
|
15
16
|
require "sentry/structured_logger"
|
|
@@ -26,6 +27,8 @@ require "sentry/threaded_periodic_worker"
|
|
|
26
27
|
require "sentry/session_flusher"
|
|
27
28
|
require "sentry/backpressure_monitor"
|
|
28
29
|
require "sentry/cron/monitor_check_ins"
|
|
30
|
+
require "sentry/cron/fugit_schedule"
|
|
31
|
+
require "sentry/cron/slug"
|
|
29
32
|
require "sentry/vernier/profiler"
|
|
30
33
|
require "sentry/metrics"
|
|
31
34
|
|
|
@@ -300,6 +303,8 @@ module Sentry
|
|
|
300
303
|
if client = get_current_client
|
|
301
304
|
client.configuration.run_after_close_callbacks
|
|
302
305
|
client.flush
|
|
306
|
+
client.log_event_buffer.kill
|
|
307
|
+
client.metric_event_buffer.kill
|
|
303
308
|
|
|
304
309
|
if client.configuration.data_collection.collect_stack_frame_variables?
|
|
305
310
|
exception_locals_tp.disable
|
|
@@ -790,3 +795,4 @@ require "sentry/graphql"
|
|
|
790
795
|
require "sentry/faraday"
|
|
791
796
|
require "sentry/excon"
|
|
792
797
|
require "sentry/std_lib_logger"
|
|
798
|
+
require "sentry/rufus_scheduler"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentry-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.
|
|
4
|
+
version: 7.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sentry Team
|
|
@@ -122,9 +122,11 @@ files:
|
|
|
122
122
|
- lib/sentry/core_ext/object/deep_dup.rb
|
|
123
123
|
- lib/sentry/core_ext/object/duplicable.rb
|
|
124
124
|
- lib/sentry/cron/configuration.rb
|
|
125
|
+
- lib/sentry/cron/fugit_schedule.rb
|
|
125
126
|
- lib/sentry/cron/monitor_check_ins.rb
|
|
126
127
|
- lib/sentry/cron/monitor_config.rb
|
|
127
128
|
- lib/sentry/cron/monitor_schedule.rb
|
|
129
|
+
- lib/sentry/cron/slug.rb
|
|
128
130
|
- lib/sentry/data_collection.rb
|
|
129
131
|
- lib/sentry/data_collection/key_value_collection.rb
|
|
130
132
|
- lib/sentry/debug_structured_logger.rb
|
|
@@ -166,6 +168,7 @@ files:
|
|
|
166
168
|
- lib/sentry/redis.rb
|
|
167
169
|
- lib/sentry/release_detector.rb
|
|
168
170
|
- lib/sentry/rspec.rb
|
|
171
|
+
- lib/sentry/rufus_scheduler.rb
|
|
169
172
|
- lib/sentry/scope.rb
|
|
170
173
|
- lib/sentry/sequel.rb
|
|
171
174
|
- lib/sentry/session.rb
|
|
@@ -185,6 +188,7 @@ files:
|
|
|
185
188
|
- lib/sentry/transport/http_transport.rb
|
|
186
189
|
- lib/sentry/transport/spotlight_transport.rb
|
|
187
190
|
- lib/sentry/utils/argument_checking_helper.rb
|
|
191
|
+
- lib/sentry/utils/callback_helper.rb
|
|
188
192
|
- lib/sentry/utils/custom_inspection.rb
|
|
189
193
|
- lib/sentry/utils/encoding_helper.rb
|
|
190
194
|
- lib/sentry/utils/env_helper.rb
|
|
@@ -202,15 +206,15 @@ files:
|
|
|
202
206
|
- lib/sentry/version.rb
|
|
203
207
|
- sentry-ruby-core.gemspec
|
|
204
208
|
- sentry-ruby.gemspec
|
|
205
|
-
homepage: https://github.com/getsentry/sentry-ruby/tree/7.
|
|
209
|
+
homepage: https://github.com/getsentry/sentry-ruby/tree/7.2.0/sentry-ruby
|
|
206
210
|
licenses:
|
|
207
211
|
- MIT
|
|
208
212
|
metadata:
|
|
209
|
-
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/7.
|
|
210
|
-
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/7.
|
|
211
|
-
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/7.
|
|
213
|
+
homepage_uri: https://github.com/getsentry/sentry-ruby/tree/7.2.0/sentry-ruby
|
|
214
|
+
source_code_uri: https://github.com/getsentry/sentry-ruby/tree/7.2.0/sentry-ruby
|
|
215
|
+
changelog_uri: https://github.com/getsentry/sentry-ruby/blob/7.2.0/CHANGELOG.md
|
|
212
216
|
bug_tracker_uri: https://github.com/getsentry/sentry-ruby/issues
|
|
213
|
-
documentation_uri: http://www.rubydoc.info/gems/sentry-ruby/7.
|
|
217
|
+
documentation_uri: http://www.rubydoc.info/gems/sentry-ruby/7.2.0
|
|
214
218
|
rdoc_options: []
|
|
215
219
|
require_paths:
|
|
216
220
|
- lib
|