bc-lightstep-ruby 2.4.1 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/bc-lightstep-ruby.gemspec +4 -6
- data/lib/bigcommerce/lightstep/active_record/adapter.rb +13 -4
- data/lib/bigcommerce/lightstep/version.rb +1 -1
- metadata +22 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5690f617aac90d828163b980e6315bcf21a5f4c2e81d46c660e275f8e51df20
|
4
|
+
data.tar.gz: a89ce02ec2b20b0d716e63f5ac3c3251a7c437063e91a8a4ab729c512108375d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4beeba6a2d87513ac111a48319988f8a8c46542eb326b1ad179fa87802eb8d9a90ee1694e1ff676a33490ce7e9a4a962bbd6e5066589d8eaf98c7ae03cd256e1
|
7
|
+
data.tar.gz: 8695c5d8d79085eba12d1e1796990ac88f755826369cdce32283205f01580515f06a0ab164b629eb27646039a0794d987be60cee76c4f08361b485a1e9f2089d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,16 @@ Changelog for the bc-lightstep-ruby gem.
|
|
2
2
|
|
3
3
|
### Pending Release
|
4
4
|
|
5
|
+
### 2.6.0
|
6
|
+
|
7
|
+
* Add support for Rails/ActiveRecord 7
|
8
|
+
* Add test coverage for Ruby 3.2
|
9
|
+
|
10
|
+
### 2.5.x
|
11
|
+
|
12
|
+
* Drop support for Ruby 2
|
13
|
+
* Remove unused NullLogger dev dependency
|
14
|
+
|
5
15
|
### 2.4.1
|
6
16
|
|
7
17
|
* Support positional argument methods when using the `Traceable` trace method
|
data/bc-lightstep-ruby.gemspec
CHANGED
@@ -31,22 +31,20 @@ Gem::Specification.new do |spec|
|
|
31
31
|
|
32
32
|
spec.files = Dir['README.md', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'lib/**/*', 'bc-lightstep-ruby.gemspec']
|
33
33
|
spec.require_paths = ['lib']
|
34
|
-
spec.required_ruby_version = '>=
|
34
|
+
spec.required_ruby_version = '>= 3.0'
|
35
35
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
36
36
|
|
37
37
|
spec.add_development_dependency 'activerecord', '> 4'
|
38
38
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
39
39
|
spec.add_development_dependency 'rake', '>= 12.0'
|
40
|
-
spec.add_development_dependency '
|
40
|
+
spec.add_development_dependency 'redis', '~> 4'
|
41
|
+
spec.add_development_dependency 'rspec', '>= 3.8'
|
41
42
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
|
42
|
-
spec.add_development_dependency 'rubocop', '
|
43
|
+
spec.add_development_dependency 'rubocop', '>= 1.0'
|
43
44
|
spec.add_development_dependency 'rubocop-performance', '>= 1.5'
|
44
45
|
spec.add_development_dependency 'simplecov', '~> 0.15'
|
45
46
|
spec.add_development_dependency 'pry', '>= 0.12'
|
46
47
|
|
47
|
-
spec.add_development_dependency 'null-logger', '~> 0.1'
|
48
|
-
spec.add_development_dependency 'redis', '~> 4'
|
49
|
-
|
50
48
|
spec.add_runtime_dependency 'activesupport', '>= 4'
|
51
49
|
spec.add_runtime_dependency 'lightstep', '~> 0.17.0'
|
52
50
|
spec.add_runtime_dependency 'faraday', ['>= 0.8', '< 2']
|
@@ -36,12 +36,21 @@ module Bigcommerce
|
|
36
36
|
end
|
37
37
|
|
38
38
|
##
|
39
|
-
# Note: we only support patching mysql2 gem at this point
|
39
|
+
# Note: we only support patching mysql2 gem at this point.
|
40
40
|
#
|
41
41
|
# @return [Boolean]
|
42
42
|
#
|
43
43
|
def self.enabled?
|
44
|
-
defined?(::ActiveRecord) && ::Bigcommerce::Lightstep.active_record
|
44
|
+
return false unless defined?(::ActiveRecord) && ::Bigcommerce::Lightstep.active_record
|
45
|
+
|
46
|
+
adapter_name = if ::ActiveRecord::Base.respond_to?(:connection_config) # rails 6
|
47
|
+
::ActiveRecord::Base.connection_config[:adapter].to_s
|
48
|
+
elsif ::ActiveRecord::Base.respond_to?(:connection_db_config) # rails 7
|
49
|
+
::ActiveRecord::Base.connection_db_config.configuration_hash[:adapter].to_s
|
50
|
+
else
|
51
|
+
'unknown'
|
52
|
+
end
|
53
|
+
adapter_name.casecmp('mysql2')&.zero? == true
|
45
54
|
rescue StandardError => e
|
46
55
|
::Bigcommerce::Lightstep.logger&.warn "Failed to determine ActiveRecord database adapter in bc-lightstep-ruby initializer: #{e.message}"
|
47
56
|
false
|
@@ -51,9 +60,9 @@ module Bigcommerce
|
|
51
60
|
# @param [String] sql The raw sql query
|
52
61
|
# @param [String] name The type of sql query
|
53
62
|
#
|
54
|
-
def execute_with_inst(sql, name = 'SQL')
|
63
|
+
def execute_with_inst(sql, name = 'SQL', async: false)
|
55
64
|
# bail out early if not enabled. This should not get here, but is provided as a failsafe.
|
56
|
-
return execute_without_inst(sql, name) unless ::Bigcommerce::Lightstep.active_record
|
65
|
+
return execute_without_inst(sql, name, async: async) unless ::Bigcommerce::Lightstep.active_record
|
57
66
|
|
58
67
|
sanitized_sql = lightstep_sanitize_sql(sql)
|
59
68
|
name = 'QUERY' if name.to_s.strip.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bc-lightstep-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -53,17 +53,31 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '12.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: redis
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.8'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '3.8'
|
69
83
|
- !ruby/object:Gem::Dependency
|
@@ -84,14 +98,14 @@ dependencies:
|
|
84
98
|
name: rubocop
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '1.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '1.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
@@ -136,34 +150,6 @@ dependencies:
|
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0.12'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: null-logger
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0.1'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0.1'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: redis
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '4'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '4'
|
167
153
|
- !ruby/object:Gem::Dependency
|
168
154
|
name: activesupport
|
169
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -269,14 +255,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
269
255
|
requirements:
|
270
256
|
- - ">="
|
271
257
|
- !ruby/object:Gem::Version
|
272
|
-
version: '
|
258
|
+
version: '3.0'
|
273
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
274
260
|
requirements:
|
275
261
|
- - ">="
|
276
262
|
- !ruby/object:Gem::Version
|
277
263
|
version: '0'
|
278
264
|
requirements: []
|
279
|
-
rubygems_version: 3.
|
265
|
+
rubygems_version: 3.4.1
|
280
266
|
signing_key:
|
281
267
|
specification_version: 4
|
282
268
|
summary: Gem for lightstep distributed tracing
|