sentry-ruby-core 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 +7 -3
|
@@ -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-core
|
|
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
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 7.
|
|
18
|
+
version: 7.2.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 7.
|
|
25
|
+
version: 7.2.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: concurrent-ruby
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -102,9 +102,11 @@ files:
|
|
|
102
102
|
- lib/sentry/core_ext/object/deep_dup.rb
|
|
103
103
|
- lib/sentry/core_ext/object/duplicable.rb
|
|
104
104
|
- lib/sentry/cron/configuration.rb
|
|
105
|
+
- lib/sentry/cron/fugit_schedule.rb
|
|
105
106
|
- lib/sentry/cron/monitor_check_ins.rb
|
|
106
107
|
- lib/sentry/cron/monitor_config.rb
|
|
107
108
|
- lib/sentry/cron/monitor_schedule.rb
|
|
109
|
+
- lib/sentry/cron/slug.rb
|
|
108
110
|
- lib/sentry/data_collection.rb
|
|
109
111
|
- lib/sentry/data_collection/key_value_collection.rb
|
|
110
112
|
- lib/sentry/debug_structured_logger.rb
|
|
@@ -146,6 +148,7 @@ files:
|
|
|
146
148
|
- lib/sentry/redis.rb
|
|
147
149
|
- lib/sentry/release_detector.rb
|
|
148
150
|
- lib/sentry/rspec.rb
|
|
151
|
+
- lib/sentry/rufus_scheduler.rb
|
|
149
152
|
- lib/sentry/scope.rb
|
|
150
153
|
- lib/sentry/sequel.rb
|
|
151
154
|
- lib/sentry/session.rb
|
|
@@ -165,6 +168,7 @@ files:
|
|
|
165
168
|
- lib/sentry/transport/http_transport.rb
|
|
166
169
|
- lib/sentry/transport/spotlight_transport.rb
|
|
167
170
|
- lib/sentry/utils/argument_checking_helper.rb
|
|
171
|
+
- lib/sentry/utils/callback_helper.rb
|
|
168
172
|
- lib/sentry/utils/custom_inspection.rb
|
|
169
173
|
- lib/sentry/utils/encoding_helper.rb
|
|
170
174
|
- lib/sentry/utils/env_helper.rb
|