honeycomb-beeline 1.0.1 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e720d5c1a680e7e59a8fe3bc21bb27545c0f6750b59e24ff122aed92b772b26d
4
- data.tar.gz: b19d894da1cb8e270ca798002692d6b153959b3d63fafe3fcf374b4fb736d053
3
+ metadata.gz: 33a6704df45d16dde8f8b96b17e45c555a135af451d6db7f9c0e71d42ead12c5
4
+ data.tar.gz: 290c100a7dc4ceeda3db9e87f5f75d95bce5234dcecc7d42be29b0c79d18bdf2
5
5
  SHA512:
6
- metadata.gz: a1d0f379990437f3b8aea1d6cb5014681c1bf55a520c66cad23cc0249e8140f4c97df54557a5b1479fb935835885ea070499ad8fc9bce0e333e23519519c404d
7
- data.tar.gz: 930431d69b1b46725d5014e6bfee66bcd57ba006ccf60c7d503c473f46fd4d56adb8003c936d69ef9e2704f98b4953bad77c8a0f75792c333abd9fc3df706d2b
6
+ metadata.gz: ea45bf6ae6776d2f85ff462f55f35c05f1eba40b8b2436870528c2a1036dd21cfe3bbc5b74ac8997fb8c82556fc1abb076cba7e6351afff2e13ae1344c50f502
7
+ data.tar.gz: ecb6939066d27472c37b3752dc83b28ac45cbc45ee2610aabd6c612e8bb88c32785e64c8e67bf42125803097c4b27645043133889b24782e5b7eb2322d97ce5c
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeycomb-beeline (1.0.1)
4
+ honeycomb-beeline (1.1.0)
5
5
  libhoney (~> 1.8)
6
6
 
7
7
  GEM
@@ -40,7 +40,7 @@ GEM
40
40
  iniparse (1.4.4)
41
41
  jaro_winkler (1.5.3)
42
42
  json (2.2.0)
43
- libhoney (1.13.6)
43
+ libhoney (1.14.0)
44
44
  addressable (~> 2.0)
45
45
  http (>= 2.0, < 5.0)
46
46
  method_source (0.9.2)
data/README.md CHANGED
@@ -18,7 +18,7 @@ Built in instrumentation for:
18
18
  - Active Support
19
19
  - Faraday
20
20
  - Rack
21
- - Rails
21
+ - Rails (tested on versions 4.1 and up)
22
22
  - Sequel
23
23
  - Sinatra
24
24
 
@@ -13,6 +13,7 @@ module Honeycomb
13
13
  faraday
14
14
  rack
15
15
  rails
16
+ railtie
16
17
  rake
17
18
  sequel
18
19
  sinatra
@@ -34,13 +35,21 @@ module Honeycomb
34
35
  end
35
36
 
36
37
  def load_integrations
37
- INTEGRATIONS.each do |integration|
38
+ integrations_to_load.each do |integration|
38
39
  begin
39
40
  require "honeycomb/integrations/#{integration}"
40
41
  rescue LoadError
41
42
  end
42
43
  end
43
44
  end
45
+
46
+ def integrations_to_load
47
+ if ENV["HONEYCOMB_INTEGRATIONS"]
48
+ ENV["HONEYCOMB_INTEGRATIONS"].split(",")
49
+ else
50
+ INTEGRATIONS
51
+ end
52
+ end
44
53
  end
45
54
  end
46
55
 
@@ -3,7 +3,7 @@
3
3
  module Honeycomb
4
4
  module Beeline
5
5
  NAME = "honeycomb-beeline".freeze
6
- VERSION = "1.0.1".freeze
6
+ VERSION = "1.1.0".freeze
7
7
  USER_AGENT_SUFFIX = "#{NAME}/#{VERSION}".freeze
8
8
  end
9
9
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rails/railtie"
4
3
  require "honeycomb/integrations/active_support"
5
4
  require "honeycomb/integrations/rack"
6
5
  require "honeycomb/integrations/warden"
@@ -36,19 +35,4 @@ module Honeycomb
36
35
  include Rails
37
36
  end
38
37
  end
39
-
40
- # Automatically capture rack requests and create a trace
41
- class Railtie < ::Rails::Railtie
42
- initializer("honeycomb.install_middleware",
43
- after: :load_config_initializers) do |app|
44
- if Honeycomb.client
45
- # what location should we insert the middleware at?
46
- app.config.middleware.insert_before(
47
- ::Rails::Rack::Logger,
48
- Honeycomb::Rails::Middleware,
49
- client: Honeycomb.client,
50
- )
51
- end
52
- end
53
- end
54
38
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/railtie"
4
+ require "honeycomb/integrations/rails"
5
+
6
+ module Honeycomb
7
+ # Automatically capture rack requests and create a trace
8
+ class Railtie < ::Rails::Railtie
9
+ initializer("honeycomb.install_middleware",
10
+ after: :load_config_initializers) do |app|
11
+ if Honeycomb.client
12
+ # what location should we insert the middleware at?
13
+ app.config.middleware.insert_before(
14
+ ::Rails::Rack::Logger,
15
+ Honeycomb::Rails::Middleware,
16
+ client: Honeycomb.client,
17
+ )
18
+ end
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeycomb-beeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Holman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-04 00:00:00.000000000 Z
11
+ date: 2019-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libhoney
@@ -229,6 +229,7 @@ files:
229
229
  - lib/honeycomb/integrations/faraday.rb
230
230
  - lib/honeycomb/integrations/rack.rb
231
231
  - lib/honeycomb/integrations/rails.rb
232
+ - lib/honeycomb/integrations/railtie.rb
232
233
  - lib/honeycomb/integrations/rake.rb
233
234
  - lib/honeycomb/integrations/sequel.rb
234
235
  - lib/honeycomb/integrations/sinatra.rb