bc-lightstep-ruby 2.2.2 → 2.4.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/CHANGELOG.md +22 -5
- data/README.md +38 -19
- data/bc-lightstep-ruby.gemspec +7 -4
- data/lib/bigcommerce/lightstep/active_record/adapter.rb +2 -2
- data/lib/bigcommerce/lightstep/active_record/tracer.rb +2 -2
- data/lib/bigcommerce/lightstep/errors.rb +1 -0
- data/lib/bigcommerce/lightstep/interceptors/env.rb +3 -2
- data/lib/bigcommerce/lightstep/redis/tracer.rb +1 -1
- data/lib/bigcommerce/lightstep/traceable.rb +64 -0
- data/lib/bigcommerce/lightstep/version.rb +2 -2
- data/lib/bigcommerce/lightstep.rb +10 -13
- metadata +41 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c51308f745da6f5f2054977944d4d833c1be333d084cf9b929c6160cc9bdd9e8
|
4
|
+
data.tar.gz: 7dacfc839a37d78d7088ef9d6a4eb24e412fc8742a40ccdfac67eb64aa54629a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b7451b70f574837c7758c32d2cef0c8a1d076931618524aa2e330c69a6bd4d520242a843432415bcba3987026c7c3ea65f0a3234075797864b6979b6512f777
|
7
|
+
data.tar.gz: 985b16c6abbe8513a829bd74d3928d42c252ea14719aadb964115aaa351e3c7d3c2e0457902c4f53cee1f4d634027ca3951fc3616b469a16a5beb6ea227f969c
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,23 @@ Changelog for the bc-lightstep-ruby gem.
|
|
2
2
|
|
3
3
|
### Pending Release
|
4
4
|
|
5
|
+
### 2.4.0
|
6
|
+
|
7
|
+
* Add `::Bigcommerce::Lightstep::Traceable` module for tracing individual methods
|
8
|
+
* Use zeitwerk for autoloading
|
9
|
+
* Add CODEOWNERS and GitHub PR Template
|
10
|
+
* Add Ruby 3.1 support
|
11
|
+
* Drop Ruby 2.6 support
|
12
|
+
* Add CodeClimate coverage
|
13
|
+
|
14
|
+
### 2.3.1
|
15
|
+
|
16
|
+
- Loosen faraday dependency
|
17
|
+
|
18
|
+
### 2.3.0
|
19
|
+
|
20
|
+
- Add support for Ruby 3
|
21
|
+
|
5
22
|
### 2.2.2
|
6
23
|
|
7
24
|
- Fix issue where parent span determination can be nil if lightstep is not initialized
|
@@ -109,7 +126,7 @@ Changelog for the bc-lightstep-ruby gem.
|
|
109
126
|
|
110
127
|
- Better handling of exceptions and tagged errors
|
111
128
|
- Lower timeouts for collector connections to reduce impact if collector is down/unreachable
|
112
|
-
- Always ensure spans are reported even in the case of exceptional failure
|
129
|
+
- Always ensure spans are reported even in the case of exceptional failure
|
113
130
|
|
114
131
|
### 1.1.6
|
115
132
|
|
@@ -118,7 +135,7 @@ Changelog for the bc-lightstep-ruby gem.
|
|
118
135
|
### 1.1.5
|
119
136
|
|
120
137
|
- Pin lightstep gem to 0.11.x due to backwards-incompatible change in 0.12.x
|
121
|
-
|
138
|
+
|
122
139
|
### 1.1.4
|
123
140
|
|
124
141
|
- Add enabled setting to explicitly disable lightstep at runtime. Can be toggled with LIGHTSTEP_ENABLED ENV var.
|
@@ -129,7 +146,7 @@ Changelog for the bc-lightstep-ruby gem.
|
|
129
146
|
|
130
147
|
### 1.1.2
|
131
148
|
|
132
|
-
- Prevent span from starting if the reporter is not yet configured, as LightStep gem does not guard this case
|
149
|
+
- Prevent span from starting if the reporter is not yet configured, as LightStep gem does not guard this case
|
133
150
|
|
134
151
|
### 1.1.1
|
135
152
|
|
@@ -138,7 +155,7 @@ Changelog for the bc-lightstep-ruby gem.
|
|
138
155
|
### 1.1.0
|
139
156
|
|
140
157
|
- Add Faraday middleware for automatic tracing of outbound service calls
|
141
|
-
|
158
|
+
|
142
159
|
### 1.0.5
|
143
160
|
|
144
161
|
- Do not send GET params in rails controller instrumentation for http.url tag
|
@@ -151,7 +168,7 @@ Changelog for the bc-lightstep-ruby gem.
|
|
151
168
|
### 1.0.3
|
152
169
|
|
153
170
|
- Fix bug where active parent span was persisting between requests in rails controller requests
|
154
|
-
|
171
|
+
|
155
172
|
### 1.0.2
|
156
173
|
|
157
174
|
- Add Bigcommerce::Lightstep::Rails::ControllerInstrumentation module for tracing H1 controllers in Rails
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# bc-lightstep-ruby - LightStep distributed tracing
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/bigcommerce/bc-lightstep-ruby/tree/main) [](https://badge.fury.io/rb/bc-lightstep-ruby) [](http://inch-ci.org/github/bigcommerce/bc-lightstep-ruby)
|
3
|
+
[](https://circleci.com/gh/bigcommerce/bc-lightstep-ruby/tree/main) [](https://badge.fury.io/rb/bc-lightstep-ruby) [](http://inch-ci.org/github/bigcommerce/bc-lightstep-ruby) [](https://codeclimate.com/github/bigcommerce/bc-lightstep-ruby/maintainability) [](https://codeclimate.com/github/bigcommerce/bc-lightstep-ruby/test_coverage)
|
4
4
|
|
5
|
-
Adds [LightStep](https://lightstep.com) tracing support for Ruby. This is an extension of the
|
5
|
+
Adds [LightStep](https://lightstep.com) tracing support for Ruby. This is an extension of the
|
6
6
|
[LightStep ruby gem](https://github.com/lightstep/lightstep-tracer-ruby) and adds extra functionality and resiliency.
|
7
7
|
|
8
8
|
## Installation
|
@@ -41,8 +41,8 @@ bc-lightstep-ruby can be automatically configured from these ENV vars, if you'd
|
|
41
41
|
| Name | Description |
|
42
42
|
| ---- | ----------- |
|
43
43
|
| LIGHTSTEP_ENABLED | Flag to determine whether to broadcast spans. Defaults to (1) enabled, 0 will disable.| 1 |
|
44
|
-
| LIGHTSTEP_COMPONENT_NAME | The component name to use | '' |
|
45
|
-
| LIGHTSTEP_ACCESS_TOKEN | The access token to use to connect to the collector. Optional. | '' |
|
44
|
+
| LIGHTSTEP_COMPONENT_NAME | The component name to use | '' |
|
45
|
+
| LIGHTSTEP_ACCESS_TOKEN | The access token to use to connect to the collector. Optional. | '' |
|
46
46
|
| LIGHTSTEP_HOST | Host of the collector. | `lightstep-collector.linkerd` |
|
47
47
|
| LIGHTSTEP_PORT | Port of the collector. | `4140` |
|
48
48
|
| LIGHTSTEP_HTTP1_ERROR_CODE | The HTTP error code to report in spans for internal errors | 500 |
|
@@ -86,12 +86,12 @@ or systems outside of your instrumenting control.
|
|
86
86
|
### Redis
|
87
87
|
|
88
88
|
This gem will automatically detect and instrument Redis calls when they are made using the `Redis::Client` class.
|
89
|
-
It will set as tags on the span the host, port, db instance, and the command (but no arguments).
|
89
|
+
It will set as tags on the span the host, port, db instance, and the command (but no arguments).
|
90
90
|
|
91
|
-
Note that this will not record redis timings if they are a root span. This is to prevent trace spamming. You can
|
91
|
+
Note that this will not record redis timings if they are a root span. This is to prevent trace spamming. You can
|
92
92
|
re-enable this by setting the `redis_allow_root_spans` configuration option to `true`.
|
93
93
|
|
94
|
-
It also excludes `ping` commands, and you can provide a custom list by setting the `redis_excluded_commands`
|
94
|
+
It also excludes `ping` commands, and you can provide a custom list by setting the `redis_excluded_commands`
|
95
95
|
configuration option to an array of commands to exclude.
|
96
96
|
|
97
97
|
### ActiveRecord and MySQL
|
@@ -103,7 +103,27 @@ The query will have no values - replaced with `?` - to ensure secure logging and
|
|
103
103
|
Note that this will not record mysql timings if they are a root span. This is to prevent trace spamming. You can
|
104
104
|
configure this gem to allow it via ENV, but it is not recommended.
|
105
105
|
|
106
|
-
By default, it will also exclude `COMMIT`, `SCHEMA`, and `SHOW FULL FIELDS` queries.
|
106
|
+
By default, it will also exclude `COMMIT`, `SCHEMA`, and `SHOW FULL FIELDS` queries.
|
107
|
+
|
108
|
+
### Individual methods
|
109
|
+
|
110
|
+
You can easily instrument individual methods with the Traceable module and `trace` method:
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
class MyService
|
114
|
+
include ::Bigcommerce::Lightstep::Traceable
|
115
|
+
|
116
|
+
trace :call, 'operation.do-my-thing' do |span:, product:, options:|
|
117
|
+
span.set_tag('store_id', request.store_id)
|
118
|
+
end
|
119
|
+
# or, with no block:
|
120
|
+
trace :call, 'operation.do-my-thing'
|
121
|
+
|
122
|
+
def call(product:, options:)
|
123
|
+
# ...
|
124
|
+
end
|
125
|
+
end
|
126
|
+
```
|
107
127
|
|
108
128
|
## RSpec
|
109
129
|
|
@@ -130,7 +150,7 @@ dynamically inject tags or alter spans as they are collected. You can configure
|
|
130
150
|
Bigcommerce::Lightstep.configure do |c|
|
131
151
|
c.interceptors.use(MyInterceptor, an_option: 123)
|
132
152
|
# or, alternatively:
|
133
|
-
c.interceptors.use(MyInterceptor.new(an_option: 123))
|
153
|
+
c.interceptors.use(MyInterceptor.new(an_option: 123))
|
134
154
|
end
|
135
155
|
```
|
136
156
|
|
@@ -142,7 +162,6 @@ so don't build interceptors that require lots of processing power or that would
|
|
142
162
|
Provided out of the box is an interceptor to automatically inject ENV vars into span tags. You can configure like so:
|
143
163
|
|
144
164
|
```ruby
|
145
|
-
|
146
165
|
Bigcommerce::Lightstep.configure do |c|
|
147
166
|
c.interceptors.use(::Bigcommerce::Lightstep::Interceptors::Env.new(
|
148
167
|
keys: {
|
@@ -157,21 +176,21 @@ The `keys` argument allows you to pass a `span tag => ENV key` mapping that will
|
|
157
176
|
`presets` argument comes with a bunch of preset mappings you can use rather than manually mapping them yourself.
|
158
177
|
|
159
178
|
Note that this interceptor _must_ be instantiated in configuration, rather than passing the class and options,
|
160
|
-
as it needs to pre-materialize the ENV values to reduce CPU usage.
|
179
|
+
as it needs to pre-materialize the ENV values to reduce CPU usage.
|
161
180
|
|
162
181
|
## License
|
163
182
|
|
164
|
-
Copyright (c) 2018-present, BigCommerce Pty. Ltd. All rights reserved
|
183
|
+
Copyright (c) 2018-present, BigCommerce Pty. Ltd. All rights reserved
|
165
184
|
|
166
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
167
|
-
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
168
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
185
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
186
|
+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
187
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
169
188
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
170
189
|
|
171
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
190
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
172
191
|
Software.
|
173
192
|
|
174
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
175
|
-
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
176
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
193
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
194
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
195
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
177
196
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/bc-lightstep-ruby.gemspec
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
16
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
17
|
#
|
18
|
-
$:.push File.expand_path('
|
18
|
+
$:.push File.expand_path('lib', __dir__)
|
19
19
|
require 'bigcommerce/lightstep/version'
|
20
20
|
|
21
21
|
Gem::Specification.new do |spec|
|
@@ -31,7 +31,8 @@ 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 = '>= 2.
|
34
|
+
spec.required_ruby_version = '>= 2.7'
|
35
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
35
36
|
|
36
37
|
spec.add_development_dependency 'activerecord', '> 4'
|
37
38
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
@@ -39,6 +40,7 @@ Gem::Specification.new do |spec|
|
|
39
40
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
40
41
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
|
41
42
|
spec.add_development_dependency 'rubocop', '~> 1.0'
|
43
|
+
spec.add_development_dependency 'rubocop-performance', '>= 1.5'
|
42
44
|
spec.add_development_dependency 'simplecov', '~> 0.15'
|
43
45
|
spec.add_development_dependency 'pry', '>= 0.12'
|
44
46
|
|
@@ -46,6 +48,7 @@ Gem::Specification.new do |spec|
|
|
46
48
|
spec.add_development_dependency 'redis', '~> 4'
|
47
49
|
|
48
50
|
spec.add_runtime_dependency 'activesupport', '>= 4'
|
49
|
-
spec.add_runtime_dependency 'lightstep', '~> 0.
|
50
|
-
spec.add_runtime_dependency 'faraday', ['>= 0.8', '
|
51
|
+
spec.add_runtime_dependency 'lightstep', '~> 0.17.0'
|
52
|
+
spec.add_runtime_dependency 'faraday', ['>= 0.8', '< 2']
|
53
|
+
spec.add_runtime_dependency 'zeitwerk', '>= 2'
|
51
54
|
end
|
@@ -41,7 +41,7 @@ module Bigcommerce
|
|
41
41
|
# @return [Boolean]
|
42
42
|
#
|
43
43
|
def self.enabled?
|
44
|
-
defined?(::ActiveRecord) && ::Bigcommerce::Lightstep.active_record && ::ActiveRecord::Base.connection_config[:adapter].to_s.
|
44
|
+
defined?(::ActiveRecord) && ::Bigcommerce::Lightstep.active_record && ::ActiveRecord::Base.connection_config[:adapter].to_s.casecmp('mysql2').zero?
|
45
45
|
rescue StandardError => e
|
46
46
|
::Bigcommerce::Lightstep.logger&.warn "Failed to determine ActiveRecord database adapter in bc-lightstep-ruby initializer: #{e.message}"
|
47
47
|
false
|
@@ -56,7 +56,7 @@ module Bigcommerce
|
|
56
56
|
return execute_without_inst(sql, name) unless ::Bigcommerce::Lightstep.active_record
|
57
57
|
|
58
58
|
sanitized_sql = lightstep_sanitize_sql(sql)
|
59
|
-
name = name.to_s.strip.empty?
|
59
|
+
name = 'QUERY' if name.to_s.strip.empty?
|
60
60
|
|
61
61
|
# we dont need to track all sql
|
62
62
|
return execute_without_inst(sql, name) if lightstep_skip_tracing?(name, sanitized_sql)
|
@@ -32,7 +32,7 @@ module Bigcommerce
|
|
32
32
|
@tracer = tracer || ::Bigcommerce::Lightstep::Tracer.instance
|
33
33
|
@span_prefix = span_prefix || ::Bigcommerce::Lightstep.active_record_span_prefix
|
34
34
|
@span_name = span_name || 'mysql'
|
35
|
-
@allow_root_spans =
|
35
|
+
@allow_root_spans = allow_root_spans.nil? ? ::Bigcommerce::Lightstep.active_record_allow_root_spans : allow_root_spans
|
36
36
|
end
|
37
37
|
|
38
38
|
##
|
@@ -68,7 +68,7 @@ module Bigcommerce
|
|
68
68
|
# @return [String]
|
69
69
|
#
|
70
70
|
def key
|
71
|
-
|
71
|
+
@span_prefix.to_s.empty? ? 'mysql' : "#{@span_prefix}.mysql"
|
72
72
|
end
|
73
73
|
|
74
74
|
##
|
@@ -34,7 +34,7 @@ module Bigcommerce
|
|
34
34
|
}.freeze
|
35
35
|
|
36
36
|
PRESET_HOSTNAME = {
|
37
|
-
|
37
|
+
hostname: 'HOSTNAME'
|
38
38
|
}.freeze
|
39
39
|
|
40
40
|
##
|
@@ -80,7 +80,8 @@ module Bigcommerce
|
|
80
80
|
@values = {}
|
81
81
|
@keys.each do |span_key, env_key|
|
82
82
|
value = @env.fetch(env_key.to_s, nil)
|
83
|
-
value =
|
83
|
+
value = '' if value.nil?
|
84
|
+
|
84
85
|
@values[span_key.to_s.downcase.tr('-', '_').strip] = value
|
85
86
|
end
|
86
87
|
@values
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bigcommerce
|
4
|
+
module Lightstep
|
5
|
+
##
|
6
|
+
# Module for adding drop-in tracing to any method. Example usage:
|
7
|
+
#
|
8
|
+
# ```ruby
|
9
|
+
# class MyService
|
10
|
+
# include ::Bigcommerce::Lightstep::Traceable
|
11
|
+
#
|
12
|
+
# trace :call, 'operation.do-my-thing' do |span, product, options|
|
13
|
+
# span.set_tag('store_id', request.store_id)
|
14
|
+
# end
|
15
|
+
# # or, with no block:
|
16
|
+
# trace :call, 'operation.do-my-thing'
|
17
|
+
#
|
18
|
+
# def call(product:, options:)
|
19
|
+
# # ...
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
# ```
|
23
|
+
#
|
24
|
+
module Traceable
|
25
|
+
def self.included(base)
|
26
|
+
base.extend ClassMethods
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# Extend the class with the tracing methods.
|
31
|
+
#
|
32
|
+
module ClassMethods
|
33
|
+
##
|
34
|
+
# Trace the perform method for the command with the given operation name as the span name
|
35
|
+
#
|
36
|
+
# @param [Symbol] method_name The method to trace
|
37
|
+
# @param [String] operation_name The name to give the span
|
38
|
+
# @param [Hash] tags A key/value hash of tags to set on the created span
|
39
|
+
# @param [Proc] span_block A block to yield before calling perform; useful for setting tags on the outer span
|
40
|
+
#
|
41
|
+
def trace(method_name, operation_name, tags: nil, &span_block)
|
42
|
+
method_name = method_name.to_sym
|
43
|
+
mod = Module.new
|
44
|
+
mod.define_method(method_name) do |args, &block|
|
45
|
+
tracer = ::Bigcommerce::Lightstep::Tracer.instance
|
46
|
+
tracer.start_span(operation_name) do |span|
|
47
|
+
tags&.each { |k, v| span.set_tag(k.to_s, v) }
|
48
|
+
span_block&.send(:call, **args.merge(span: span))
|
49
|
+
begin
|
50
|
+
super(**args, &block)
|
51
|
+
rescue StandardError => e
|
52
|
+
span.set_tag('error', true)
|
53
|
+
span.set_tag('error.message', e.message)
|
54
|
+
span.set_tag('error.class', e.class.to_s)
|
55
|
+
raise
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
prepend(mod)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -8,7 +8,7 @@
|
|
8
8
|
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
9
9
|
#
|
10
10
|
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
11
|
-
# Software.
|
11
|
+
# Software.have a
|
12
12
|
#
|
13
13
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
14
14
|
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
@@ -17,6 +17,6 @@
|
|
17
17
|
#
|
18
18
|
module Bigcommerce
|
19
19
|
module Lightstep
|
20
|
-
VERSION = '2.
|
20
|
+
VERSION = '2.4.0'
|
21
21
|
end
|
22
22
|
end
|
@@ -18,19 +18,16 @@
|
|
18
18
|
require 'lightstep'
|
19
19
|
require 'faraday'
|
20
20
|
require 'active_support/concern'
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
require_relative 'lightstep/active_record/tracer'
|
32
|
-
require_relative 'lightstep/active_record/adapter'
|
33
|
-
require_relative 'lightstep/redis/tracer'
|
21
|
+
|
22
|
+
# use Zeitwerk to lazily autoload all the files in the lib directory
|
23
|
+
require 'zeitwerk'
|
24
|
+
loader = ::Zeitwerk::Loader.new
|
25
|
+
loader.tag = File.basename(__FILE__, '.rb')
|
26
|
+
loader.inflector = ::Zeitwerk::GemInflector.new(__FILE__)
|
27
|
+
loader.ignore("#{__dir__}/lightstep/rspec.rb")
|
28
|
+
loader.ignore("#{File.dirname(__dir__)}/bc-lightstep-ruby.rb")
|
29
|
+
loader.push_dir(File.dirname(__dir__))
|
30
|
+
loader.setup
|
34
31
|
|
35
32
|
##
|
36
33
|
# Main base module
|
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.4.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: 2022-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-performance
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.5'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.5'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: simplecov
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,14 +184,14 @@ dependencies:
|
|
170
184
|
requirements:
|
171
185
|
- - "~>"
|
172
186
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
187
|
+
version: 0.17.0
|
174
188
|
type: :runtime
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
192
|
- - "~>"
|
179
193
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
194
|
+
version: 0.17.0
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: faraday
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,9 +199,9 @@ dependencies:
|
|
185
199
|
- - ">="
|
186
200
|
- !ruby/object:Gem::Version
|
187
201
|
version: '0.8'
|
188
|
-
- - "
|
202
|
+
- - "<"
|
189
203
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
204
|
+
version: '2'
|
191
205
|
type: :runtime
|
192
206
|
prerelease: false
|
193
207
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -195,9 +209,23 @@ dependencies:
|
|
195
209
|
- - ">="
|
196
210
|
- !ruby/object:Gem::Version
|
197
211
|
version: '0.8'
|
198
|
-
- - "
|
212
|
+
- - "<"
|
213
|
+
- !ruby/object:Gem::Version
|
214
|
+
version: '2'
|
215
|
+
- !ruby/object:Gem::Dependency
|
216
|
+
name: zeitwerk
|
217
|
+
requirement: !ruby/object:Gem::Requirement
|
218
|
+
requirements:
|
219
|
+
- - ">="
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '2'
|
222
|
+
type: :runtime
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
199
227
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
228
|
+
version: '2'
|
201
229
|
description: Gem for lightstep distributed tracing
|
202
230
|
email:
|
203
231
|
- shaun.mccormick@bigcommerce.com
|
@@ -223,6 +251,7 @@ files:
|
|
223
251
|
- lib/bigcommerce/lightstep/redis/tracer.rb
|
224
252
|
- lib/bigcommerce/lightstep/redis/wrapper.rb
|
225
253
|
- lib/bigcommerce/lightstep/rspec.rb
|
254
|
+
- lib/bigcommerce/lightstep/traceable.rb
|
226
255
|
- lib/bigcommerce/lightstep/tracer.rb
|
227
256
|
- lib/bigcommerce/lightstep/transport.rb
|
228
257
|
- lib/bigcommerce/lightstep/transport_factory.rb
|
@@ -230,7 +259,8 @@ files:
|
|
230
259
|
homepage: https://github.com/bigcommerce/bc-lightstep-ruby
|
231
260
|
licenses:
|
232
261
|
- MIT
|
233
|
-
metadata:
|
262
|
+
metadata:
|
263
|
+
rubygems_mfa_required: 'true'
|
234
264
|
post_install_message:
|
235
265
|
rdoc_options: []
|
236
266
|
require_paths:
|
@@ -239,14 +269,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
239
269
|
requirements:
|
240
270
|
- - ">="
|
241
271
|
- !ruby/object:Gem::Version
|
242
|
-
version: '2.
|
272
|
+
version: '2.7'
|
243
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
244
274
|
requirements:
|
245
275
|
- - ">="
|
246
276
|
- !ruby/object:Gem::Version
|
247
277
|
version: '0'
|
248
278
|
requirements: []
|
249
|
-
rubygems_version: 3.
|
279
|
+
rubygems_version: 3.3.3
|
250
280
|
signing_key:
|
251
281
|
specification_version: 4
|
252
282
|
summary: Gem for lightstep distributed tracing
|