sentry-ruby-core 4.8.2 → 4.9.2
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/README.md +2 -0
- data/lib/sentry/background_worker.rb +3 -1
- data/lib/sentry/backtrace.rb +0 -3
- data/lib/sentry/breadcrumb.rb +22 -3
- data/lib/sentry/breadcrumb_buffer.rb +14 -0
- data/lib/sentry/client.rb +35 -2
- data/lib/sentry/configuration.rb +4 -3
- data/lib/sentry/event.rb +54 -18
- data/lib/sentry/hub.rb +3 -0
- data/lib/sentry/interface.rb +1 -10
- data/lib/sentry/interfaces/exception.rb +11 -3
- data/lib/sentry/interfaces/request.rb +34 -18
- data/lib/sentry/interfaces/stacktrace.rb +4 -0
- data/lib/sentry/interfaces/stacktrace_builder.rb +37 -10
- data/lib/sentry/interfaces/threads.rb +10 -2
- data/lib/sentry/net/http.rb +49 -64
- data/lib/sentry/scope.rb +67 -1
- data/lib/sentry/span.rb +83 -8
- data/lib/sentry/transaction.rb +42 -9
- data/lib/sentry/transaction_event.rb +8 -0
- data/lib/sentry/transport.rb +4 -1
- data/lib/sentry/utils/logging_helper.rb +4 -4
- data/lib/sentry/version.rb +1 -1
- data/lib/sentry-ruby.rb +41 -2
- metadata +2 -2
data/lib/sentry/transport.rb
CHANGED
@@ -23,7 +23,10 @@ module Sentry
|
|
23
23
|
|
24
24
|
include LoggingHelper
|
25
25
|
|
26
|
-
attr_reader :
|
26
|
+
attr_reader :rate_limits, :discarded_events, :last_client_report_sent
|
27
|
+
|
28
|
+
# @deprecated Use Sentry.logger to retrieve the current logger instead.
|
29
|
+
attr_reader :logger
|
27
30
|
|
28
31
|
def initialize(configuration)
|
29
32
|
@logger = configuration.logger
|
@@ -6,21 +6,21 @@ module Sentry
|
|
6
6
|
message = "#{message}: #{exception.message}"
|
7
7
|
message += "\n#{exception.backtrace.join("\n")}" if debug
|
8
8
|
|
9
|
-
logger.error(LOGGER_PROGNAME) do
|
9
|
+
@logger.error(LOGGER_PROGNAME) do
|
10
10
|
message
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def log_info(message)
|
15
|
-
logger.info(LOGGER_PROGNAME) { message }
|
15
|
+
@logger.info(LOGGER_PROGNAME) { message }
|
16
16
|
end
|
17
17
|
|
18
18
|
def log_debug(message)
|
19
|
-
logger.debug(LOGGER_PROGNAME) { message }
|
19
|
+
@logger.debug(LOGGER_PROGNAME) { message }
|
20
20
|
end
|
21
21
|
|
22
22
|
def log_warn(message)
|
23
|
-
logger.warn(LOGGER_PROGNAME) { message }
|
23
|
+
@logger.warn(LOGGER_PROGNAME) { message }
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/sentry/version.rb
CHANGED
data/lib/sentry-ruby.rb
CHANGED
@@ -18,7 +18,6 @@ require "sentry/transaction"
|
|
18
18
|
require "sentry/hub"
|
19
19
|
require "sentry/background_worker"
|
20
20
|
|
21
|
-
|
22
21
|
[
|
23
22
|
"sentry/rake",
|
24
23
|
"sentry/rack",
|
@@ -101,7 +100,47 @@ module Sentry
|
|
101
100
|
|
102
101
|
extend Forwardable
|
103
102
|
|
103
|
+
# @!macro [new] configuration
|
104
|
+
# The Configuration object that's used for configuring the client and its transport.
|
105
|
+
# @return [Configuration]
|
106
|
+
# @!macro [new] send_event
|
107
|
+
# Sends the event to Sentry.
|
108
|
+
# @param event [Event] the event to be sent.
|
109
|
+
# @param hint [Hash] the hint data that'll be passed to `before_send` callback.
|
110
|
+
# @return [Event]
|
111
|
+
|
112
|
+
# @!method configuration
|
113
|
+
# @!macro configuration
|
114
|
+
# @!method send_event
|
115
|
+
# @!macro send_event
|
104
116
|
def_delegators :get_current_client, :configuration, :send_event
|
117
|
+
|
118
|
+
# @!macro [new] set_extras
|
119
|
+
# Updates the scope's extras attribute by merging with the old value.
|
120
|
+
# @param extras [Hash]
|
121
|
+
# @return [Hash]
|
122
|
+
# @!macro [new] set_user
|
123
|
+
# Sets the scope's user attribute.
|
124
|
+
# @param user [Hash]
|
125
|
+
# @return [Hash]
|
126
|
+
# @!macro [new] set_context
|
127
|
+
# Adds a new key-value pair to current contexts.
|
128
|
+
# @param key [String, Symbol]
|
129
|
+
# @param value [Object]
|
130
|
+
# @return [Hash]
|
131
|
+
# @!macro [new] set_tags
|
132
|
+
# Updates the scope's tags attribute by merging with the old value.
|
133
|
+
# @param tags [Hash]
|
134
|
+
# @return [Hash]
|
135
|
+
|
136
|
+
# @!method set_tags
|
137
|
+
# @!macro set_tags
|
138
|
+
# @!method set_extras
|
139
|
+
# @!macro set_extras
|
140
|
+
# @!method set_user
|
141
|
+
# @!macro set_user
|
142
|
+
# @!method set_context
|
143
|
+
# @!macro set_context
|
105
144
|
def_delegators :get_current_scope, :set_tags, :set_extras, :set_user, :set_context
|
106
145
|
|
107
146
|
##### Main APIs #####
|
@@ -135,7 +174,7 @@ module Sentry
|
|
135
174
|
#
|
136
175
|
# @return [Boolean]
|
137
176
|
def initialized?
|
138
|
-
|
177
|
+
!!get_main_hub
|
139
178
|
end
|
140
179
|
|
141
180
|
# Returns an uri for security policy reporting that's generated from the given DSN
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-ruby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|