honeycomb-beeline 1.0.0.pre.beta1 → 1.0.0.pre.beta2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82b95aabb597985b2e4de6b046ce377fa98d44acfb375fa559bac4111c61c823
4
- data.tar.gz: 75274e65f750b4e8d7f8569ea1b427ce5ae38b219a3f494e1799e0a058ad12c2
3
+ metadata.gz: b6455d0acd6092c717f845bce1c18c8661b9921f54d48ec948ac119ca2d94457
4
+ data.tar.gz: 6b44aa77a86270f5cb1387a4fc9bc1bb4cdb17cb6c747134b6e9aade96eddfa2
5
5
  SHA512:
6
- metadata.gz: 1e184edc47431acc515d7c4fb862003175be536fc98f7400681e4c3d5c12a43dd7949006325730f7c0f3fccc6318359b4510d248b081ae8d2d53dd9a0890e914
7
- data.tar.gz: bfc2d332f869a7e94cd64fb3e7195be3f5ed011865a1b5adc043714c19c52fef3ae0ca2a63d7a7f1b213404f23154dfe59510727c422f455d04a1ede533278a6
6
+ metadata.gz: da4974ae6e23ddad9d013e385563f106bd37277cb52450a66587219e3d559e5e889bb61acea84a9c840d14138e3b5e3691517db2652d0278d3869f9bc061c12c
7
+ data.tar.gz: 8cdce0a0c217dde18ef0d07712e4f81648b53ed3b170a33f7c3c564592403a45d3c4bb5885c78794e783b085741c6bc7595c5234662084d826a9bf1623cd3afa
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeycomb-beeline (1.0.0.pre.beta1)
4
+ honeycomb-beeline (1.0.0.pre.beta2)
5
5
  libhoney (~> 1.8)
6
6
 
7
7
  GEM
data/UPGRADING.md CHANGED
@@ -3,17 +3,17 @@
3
3
  ## 0.8.0 - 1.0.0
4
4
 
5
5
  1. If you have a web application, remove beeline configuration from the `config.ru` file
6
- 1. If you have a rails application, run the honeycomb generator `bundle exec rails generate honeycomb {writekey}`
6
+ 1. If you have a rails application, run the honeycomb generator `bundle exec rails generate honeycomb {writekey} --dataset {dataset}`
7
7
  1. Replace call to `Honeycomb.init` with the following (if using rails, this will now live in `config/initializers/honeycomb.rb`)
8
8
  ```ruby
9
9
  Honeycomb.configure do |config|
10
10
  config.write_key = "{writekey}"
11
- config.dataset = "rails"
11
+ config.dataset = "{dataset}"
12
12
  end
13
13
  ```
14
14
  1. Replace any `Rack::Honeycomb.add_field` calls with the following
15
15
  ```ruby
16
- Honeycomb.client.add_field("name", "value")
16
+ Honeycomb.add_field("name", "value")
17
17
  ```
18
18
  1. Replace any `Honeycomb.span` calls with the following
19
19
  ```ruby
@@ -24,7 +24,7 @@
24
24
 
25
25
  ## honeycomb-rails to beeline-ruby
26
26
 
27
- 1. Update Gemfile, remove `honeycomb-rails` and add `beeline-ruby`
27
+ 1. Update Gemfile, remove `honeycomb-rails` and add `honeycomb-beeline`
28
28
  1. Run `bundle install`
29
29
  1. Remove the `honeycomb.rb` initializer from `config/initializers`
30
30
  1. Add the following to the `config.ru` file
@@ -3,7 +3,7 @@
3
3
  module Honeycomb
4
4
  module Beeline
5
5
  NAME = "honeycomb-beeline".freeze
6
- VERSION = "1.0.0-beta1".freeze
6
+ VERSION = "1.0.0-beta2".freeze
7
7
  USER_AGENT_SUFFIX = "#{NAME}/#{VERSION}".freeze
8
8
  end
9
9
  end
@@ -33,7 +33,7 @@ module Honeycomb
33
33
  end
34
34
  end
35
35
 
36
- def start_span(name:, serialized_trace: nil)
36
+ def start_span(name:, serialized_trace: nil, **fields)
37
37
  if context.current_trace.nil?
38
38
  Trace.new(serialized_trace: serialized_trace,
39
39
  builder: client.builder,
@@ -43,6 +43,10 @@ module Honeycomb
43
43
  context.current_span.create_child
44
44
  end
45
45
 
46
+ fields.each do |key, value|
47
+ context.current_span.add_field(key, value)
48
+ end
49
+
46
50
  context.current_span.add_field("name", name)
47
51
 
48
52
  if block_given?
@@ -7,7 +7,8 @@ module Honeycomb
7
7
  class Configuration
8
8
  attr_accessor :write_key,
9
9
  :dataset,
10
- :api_host
10
+ :api_host,
11
+ :debug
11
12
 
12
13
  attr_writer :service_name, :client, :host_name
13
14
 
@@ -15,6 +16,7 @@ module Honeycomb
15
16
  @write_key = ENV["HONEYCOMB_WRITEKEY"]
16
17
  @dataset = ENV["HONEYCOMB_DATASET"]
17
18
  @service_name = ENV["HONEYCOMB_SERVICE"]
19
+ @debug = ENV.key?("HONEYCOMB_DEBUG")
18
20
  @client = nil
19
21
  end
20
22
 
@@ -29,7 +31,9 @@ module Honeycomb
29
31
  api_host && o[:api_host] = api_host
30
32
  end
31
33
 
32
- @client || Libhoney::Client.new(options)
34
+ @client ||
35
+ (debug && Libhoney::LogClient.new) ||
36
+ Libhoney::Client.new(options)
33
37
  end
34
38
 
35
39
  def after_initialize(client)
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.0.pre.beta1
4
+ version: 1.0.0.pre.beta2
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-07-10 00:00:00.000000000 Z
11
+ date: 2019-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: libhoney