sentry-rails 5.10.0 → 5.11.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 +6 -1
- data/lib/sentry/rails/action_cable.rb +1 -4
- data/lib/sentry/rails/capture_exceptions.rb +1 -4
- data/lib/sentry/rails/configuration.rb +1 -1
- data/lib/sentry/rails/tracing/active_record_subscriber.rb +24 -1
- data/lib/sentry/rails/version.rb +1 -1
- data/sentry-rails.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39ae75bb0a992ced9247272ab6d20ff61aee51ee2a9a02f309204fb01533aae3
|
4
|
+
data.tar.gz: 6a00192e48a695c90ed994ccdb40cc4def17c1263c1c469d2c7daac5f933607b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a99466d8bbab1261f08b0bdf2a1394e5dfb473fc53e9f4af91fb67411ef668c2e49c26496be127a7e2f5350c4d745388eddb0f357963caafe966a77cc8ce3028
|
7
|
+
data.tar.gz: 33f3d414890890cda3529d8f21f916f74db743ce466b8fc7f70a1529a659d1be6360f6e98097ddf30ea896c8d85c497acd2e73c1831d1025fcc669f56f6562e5
|
data/Gemfile
CHANGED
@@ -47,7 +47,12 @@ gem "rake", "~> 12.0"
|
|
47
47
|
|
48
48
|
if RUBY_VERSION.to_f >= 2.6
|
49
49
|
gem "debug", github: "ruby/debug", platform: :ruby
|
50
|
-
|
50
|
+
|
51
|
+
if rails_version == Gem::Version.new("6.0.0") && RUBY_VERSION.to_f == 2.7
|
52
|
+
gem "irb", "~> 1.7.4" # irb 1.8 adds psych via rdoc that causes CI to fail
|
53
|
+
else
|
54
|
+
gem "irb"
|
55
|
+
end
|
51
56
|
end
|
52
57
|
|
53
58
|
gem "pry"
|
@@ -33,11 +33,8 @@ module Sentry
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def start_transaction(env, scope)
|
36
|
-
sentry_trace = env["HTTP_SENTRY_TRACE"]
|
37
|
-
baggage = env["HTTP_BAGGAGE"]
|
38
|
-
|
39
36
|
options = { name: scope.transaction_name, source: scope.transaction_source, op: OP_NAME }
|
40
|
-
transaction = Sentry
|
37
|
+
transaction = Sentry.continue_trace(env, **options)
|
41
38
|
Sentry.start_transaction(transaction: transaction, **options)
|
42
39
|
end
|
43
40
|
|
@@ -32,16 +32,13 @@ module Sentry
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def start_transaction(env, scope)
|
35
|
-
sentry_trace = env["HTTP_SENTRY_TRACE"]
|
36
|
-
baggage = env["HTTP_BAGGAGE"]
|
37
|
-
|
38
35
|
options = { name: scope.transaction_name, source: scope.transaction_source, op: transaction_op }
|
39
36
|
|
40
37
|
if @assets_regexp && scope.transaction_name.match?(@assets_regexp)
|
41
38
|
options.merge!(sampled: false)
|
42
39
|
end
|
43
40
|
|
44
|
-
transaction = Sentry
|
41
|
+
transaction = Sentry.continue_trace(env, **options)
|
45
42
|
Sentry.start_transaction(transaction: transaction, custom_sampling_context: { env: env }, **options)
|
46
43
|
end
|
47
44
|
|
@@ -13,8 +13,31 @@ module Sentry
|
|
13
13
|
next if EXCLUDED_EVENTS.include? payload[:name]
|
14
14
|
|
15
15
|
record_on_current_span(op: SPAN_PREFIX + event_name, start_timestamp: payload[START_TIMESTAMP_NAME], description: payload[:sql], duration: duration) do |span|
|
16
|
-
span.set_data(:connection_id, payload[:connection_id])
|
17
16
|
span.set_tag(:cached, true) if payload.fetch(:cached, false) # cached key is only set for hits in the QueryCache, from Rails 5.1
|
17
|
+
|
18
|
+
connection = payload[:connection]
|
19
|
+
|
20
|
+
if payload[:connection_id]
|
21
|
+
span.set_data(:connection_id, payload[:connection_id])
|
22
|
+
|
23
|
+
# we fallback to the base connection on rails < 6.0.0 since the payload doesn't have it
|
24
|
+
base_connection = ActiveRecord::Base.connection
|
25
|
+
connection ||= base_connection if payload[:connection_id] == base_connection.object_id
|
26
|
+
end
|
27
|
+
|
28
|
+
next unless connection
|
29
|
+
|
30
|
+
db_config = if connection.pool.respond_to?(:db_config)
|
31
|
+
connection.pool.db_config.configuration_hash
|
32
|
+
elsif connection.pool.respond_to?(:spec)
|
33
|
+
connection.pool.spec.config
|
34
|
+
end
|
35
|
+
|
36
|
+
span.set_data(Span::DataConventions::DB_SYSTEM, db_config[:adapter]) if db_config[:adapter]
|
37
|
+
span.set_data(Span::DataConventions::DB_NAME, db_config[:database]) if db_config[:database]
|
38
|
+
span.set_data(Span::DataConventions::SERVER_ADDRESS, db_config[:host]) if db_config[:host]
|
39
|
+
span.set_data(Span::DataConventions::SERVER_PORT, db_config[:port]) if db_config[:port]
|
40
|
+
span.set_data(Span::DataConventions::SERVER_SOCKET_ADDRESS, db_config[:socket]) if db_config[:socket]
|
18
41
|
end
|
19
42
|
end
|
20
43
|
end
|
data/lib/sentry/rails/version.rb
CHANGED
data/sentry-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sentry-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sentry Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.11.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.
|
40
|
+
version: 5.11.0
|
41
41
|
description: A gem that provides Rails integration for the Sentry error logger
|
42
42
|
email: accounts@sentry.io
|
43
43
|
executables: []
|