bc-lightstep-ruby 1.1.6 → 1.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae2b58de5cad4cb1d3f95f0392e8e5a2f26bc92d7166f0786973d1db2365c34c
4
- data.tar.gz: fb76f4e5520ae29ba6c9cf51765ea4ef29b953478edece1d0d613bd38969b7a1
3
+ metadata.gz: 402c34ffb90db4b5f068099b70c80cc933dc8f4f5f4914de05bd2c09398842a7
4
+ data.tar.gz: af092007c4a9a2ceca3bebd200e332e38c2539e8438a3ec9a840a7c03aaf66e5
5
5
  SHA512:
6
- metadata.gz: ce9814bbece997fe409cf3bf369a7c4ee086b14c486e9d16eeae7bd10ffe9a9a69b2d60c591dd111587dbfa5d485da82091211b72d829b27fb2ee22e2c21ff41
7
- data.tar.gz: 6112a5d04acc35a38109cc5541fd88d2571e7ba699ec64a1bde19007bf442ed2c482619de4b65b8ae035a94eb4d5c9554c5dc10c9065891833b6744543074932
6
+ metadata.gz: 1adafe2e08b065730025e548b6711b6c6ec673f0c92e022d7b6cd9bf2cef8547ca0867efb3b9b692eccb3f929f2277c8338700ca22c38ef68653fc5ba1c2951b
7
+ data.tar.gz: dd4ebff9ddbc843051745e3762a1bc0d8ac2790b5341483192e22dee990718221191c6f20850cec6f68f38ce1e8f914df3b99c0e85e6d056ef8d2c0f795a67a5
@@ -2,6 +2,12 @@ Changelog for the bc-lightstep-ruby gem.
2
2
 
3
3
  h3. Pending Release
4
4
 
5
+ h3. 1.1.7
6
+
7
+ - Better handling of exceptions and tagged errors
8
+ - Lower timeouts for collector connections to reduce impact if collector is down/unreachable
9
+ - Always ensure spans are reported even in the case of exceptional failure
10
+
5
11
  h3. 1.1.6
6
12
 
7
13
  - First OSS release
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # bc-lightstep-ruby - LightStep distributed tracing
2
2
 
3
- [![Build Status](https://travis-ci.com/bigcommerce/bc-lightstep-ruby.svg?token=D3Cc4LCF9BgpUx4dpPpv&branch=master)](https://travis-ci.com/bigcommerce/bc-lightstep-ruby)
3
+ [![Build Status](https://travis-ci.com/bigcommerce/bc-lightstep-ruby.svg?token=D3Cc4LCF9BgpUx4dpPpv&branch=master)](https://travis-ci.com/bigcommerce/bc-lightstep-ruby) [![Gem Version](https://badge.fury.io/rb/bc-lightstep-ruby.svg)](https://badge.fury.io/rb/bc-lightstep-ruby) [![Inline docs](http://inch-ci.org/github/bigcommerce/bc-lightstep-ruby.svg?branch=master)](http://inch-ci.org/github/bigcommerce/bc-lightstep-ruby)
4
4
 
5
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.
@@ -8,7 +8,7 @@ Adds [LightStep](https://lightstep.com) tracing support for Ruby. This is an ext
8
8
  ## Installation
9
9
 
10
10
  ```ruby
11
- gem 'bc-lightstep-ruby', git: 'git@github.com/bigcommerce/bc-lightstep-ruby'
11
+ gem 'bc-lightstep-ruby'
12
12
  ```
13
13
 
14
14
  Then in an initializer or before use:
@@ -48,7 +48,7 @@ bc-lightstep-ruby can be automatically configured from these ENV vars, if you'd
48
48
  | LIGHTSTEP_SSL_VERIFY_PEER | If using 443 as the port, toggle SSL verification. Defaults to true. |
49
49
  | LIGHTSTEP_VERBOSITY | The verbosity level of lightstep logs. Defaults to 1. |
50
50
 
51
- Most BC systems will only need to customize the component name.
51
+ Most systems will only need to customize the component name.
52
52
 
53
53
  ### Instrumenting Rails Controllers
54
54
 
@@ -70,7 +70,7 @@ end
70
70
 
71
71
  Spans will be built with the external service name. It's generally _not_ a good idea to use the Faraday adapter
72
72
  with internal services that are also instrumented with LightStep - use the Faraday adapter on external services
73
- or systems outside of our instrumenting control.
73
+ or systems outside of your instrumenting control.
74
74
 
75
75
  ## License
76
76
 
@@ -56,6 +56,7 @@ module Bigcommerce
56
56
  headers.each do |k, v|
57
57
  fk = k.to_s.downcase.gsub('http_', '').tr('_', '-')
58
58
  next unless OPEN_TRACING_HEADER_KEYS.include?(fk)
59
+
59
60
  filtered_ot_headers[fk] = v
60
61
  end
61
62
  filtered_ot_headers
@@ -58,13 +58,18 @@ module Bigcommerce
58
58
  self.active_span = span
59
59
 
60
60
  # run the process
61
- result = yield span
62
-
63
- # finish this span if the reporter is initialized
64
- span.finish if reporter_initialized?
65
-
66
- # now set back the parent as the active span
67
- self.active_span = last_active_span
61
+ begin
62
+ result = yield span
63
+ rescue StandardError
64
+ span.set_tag('error', true)
65
+ raise
66
+ ensure
67
+ # finish this span if the reporter is initialized
68
+ span.finish if reporter_initialized?
69
+
70
+ # now set back the parent as the active span
71
+ self.active_span = last_active_span
72
+ end
68
73
 
69
74
  # return result
70
75
  result
@@ -47,8 +47,8 @@ module Bigcommerce
47
47
  verbose: 0,
48
48
  encryption: ENCRYPTION_TLS,
49
49
  ssl_verify_peer: true,
50
- open_timeout: 20,
51
- read_timeout: 20,
50
+ open_timeout: 2,
51
+ read_timeout: 2,
52
52
  continue_timeout: nil,
53
53
  keep_alive_timeout: 2,
54
54
  logger: nil
@@ -64,7 +64,9 @@ module Bigcommerce
64
64
  @keep_alive_timeout = keep_alive_timeout.to_i
65
65
 
66
66
  raise ::Bigcommerce::Lightstep::Errors::InvalidAccessToken, 'access_token must be a string' unless access_token.is_a?(String)
67
+
67
68
  raise ::Bigcommerce::Lightstep::Errors::InvalidAccessToken, 'access_token cannot be blank' if access_token.empty?
69
+
68
70
  @access_token = access_token.to_s
69
71
  @logger = logger || ::Logger.new(STDOUT)
70
72
  end
@@ -15,6 +15,6 @@
15
15
  #
16
16
  module Bigcommerce
17
17
  module Lightstep
18
- VERSION = '1.1.6'.freeze
18
+ VERSION = '1.1.7'.freeze
19
19
  end
20
20
  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: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun McCormick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-06 00:00:00.000000000 Z
11
+ date: 2018-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler