bc-lightstep-ruby 2.2.1 → 2.2.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/CHANGELOG.md +5 -0
- data/bc-lightstep-ruby.gemspec +0 -1
- data/lib/bigcommerce/lightstep/tracer.rb +17 -1
- data/lib/bigcommerce/lightstep/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f3a1bf19d2bd647344092637b395c79889582497e7505fe88a15e54ca490f49
|
4
|
+
data.tar.gz: 3dd48770cacc6e088edcbb63e26a9da3954b5112cc840890d79df3285c73b3b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d8849b91e102c4ad4cac2272368d19b8f523f3195b280f9a7007344135c436ca9f7f0e44a0a0403dc4f1ea854a5de27e001d96eb96b40498d28ce63280f3501
|
7
|
+
data.tar.gz: 4fe13e2093848bba17236988b49649fbeeba3291f4c545d0732e7b4b79182c855719dcc7363f36e39141ff895976047fb369560abaaf328c688df2b426855dba
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@ Changelog for the bc-lightstep-ruby gem.
|
|
2
2
|
|
3
3
|
### Pending Release
|
4
4
|
|
5
|
+
### 2.2.2
|
6
|
+
|
7
|
+
- Fix issue where parent span determination can be nil if lightstep is not initialized
|
8
|
+
- Add tests for Ruby 2.7
|
9
|
+
|
5
10
|
### 2.2.1
|
6
11
|
|
7
12
|
- Only set error tag in exceptions if not already set
|
data/bc-lightstep-ruby.gemspec
CHANGED
@@ -34,7 +34,6 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.required_ruby_version = '>= 2.6'
|
35
35
|
|
36
36
|
spec.add_development_dependency 'activerecord', '> 4'
|
37
|
-
spec.add_development_dependency 'bundler', '~> 1.11'
|
38
37
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
39
38
|
spec.add_development_dependency 'rake', '>= 12.0'
|
40
39
|
spec.add_development_dependency 'rspec', '~> 3.8'
|
@@ -128,7 +128,7 @@ module Bigcommerce
|
|
128
128
|
def determine_parent(context:)
|
129
129
|
# first attempt to find parent from args, if not, use carrier (headers) to lookup parent
|
130
130
|
# 1 = FORMAT_TEXT_MAP (this constant is removed in future lightstep versions)
|
131
|
-
current_parent =
|
131
|
+
current_parent = extract_parent_from_context(context)
|
132
132
|
# if no passed in parent, use the active thread parent
|
133
133
|
current_parent = active_span if current_parent.nil?
|
134
134
|
current_parent
|
@@ -155,6 +155,22 @@ module Bigcommerce
|
|
155
155
|
def mark_root_span(span)
|
156
156
|
span.instance_variable_set(:@root_span, true)
|
157
157
|
end
|
158
|
+
|
159
|
+
##
|
160
|
+
# @param [Hash|::LightStep::SpanContext] context
|
161
|
+
# @return [::LightStep::SpanContext]
|
162
|
+
# @return [NilClass]
|
163
|
+
#
|
164
|
+
def extract_parent_from_context(context)
|
165
|
+
return context if context.is_a?(::LightStep::SpanContext)
|
166
|
+
|
167
|
+
tracer.extract(1, context || {})
|
168
|
+
rescue StandardError => _e
|
169
|
+
# sometimes LightStep, when `start` is not run first, will error here. This protects this until the upstream
|
170
|
+
# library can be fixed. We essentially just want to silently no-op here, as this failing simply means there's
|
171
|
+
# no context to extract.
|
172
|
+
nil
|
173
|
+
end
|
158
174
|
end
|
159
175
|
end
|
160
176
|
end
|
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.2.
|
4
|
+
version: 2.2.2
|
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: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.11'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.11'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler-audit
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
246
|
- !ruby/object:Gem::Version
|
261
247
|
version: '0'
|
262
248
|
requirements: []
|
263
|
-
rubygems_version: 3.
|
249
|
+
rubygems_version: 3.2.3
|
264
250
|
signing_key:
|
265
251
|
specification_version: 4
|
266
252
|
summary: Gem for lightstep distributed tracing
|