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 +4 -4
- data/Gemfile.lock +1 -1
- data/UPGRADING.md +4 -4
- data/lib/honeycomb/beeline/version.rb +1 -1
- data/lib/honeycomb/client.rb +5 -1
- data/lib/honeycomb/configuration.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6455d0acd6092c717f845bce1c18c8661b9921f54d48ec948ac119ca2d94457
|
4
|
+
data.tar.gz: 6b44aa77a86270f5cb1387a4fc9bc1bb4cdb17cb6c747134b6e9aade96eddfa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da4974ae6e23ddad9d013e385563f106bd37277cb52450a66587219e3d559e5e889bb61acea84a9c840d14138e3b5e3691517db2652d0278d3869f9bc061c12c
|
7
|
+
data.tar.gz: 8cdce0a0c217dde18ef0d07712e4f81648b53ed3b170a33f7c3c564592403a45d3c4bb5885c78794e783b085741c6bc7595c5234662084d826a9bf1623cd3afa
|
data/Gemfile.lock
CHANGED
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 = "
|
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.
|
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
|
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
|
data/lib/honeycomb/client.rb
CHANGED
@@ -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 ||
|
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.
|
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-
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libhoney
|