libhoney 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -14
- data/lib/libhoney/transmission.rb +8 -8
- data/lib/libhoney/version.rb +1 -1
- data/libhoney.gemspec +3 -3
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca640b83438614aa15108f5fc6be924f3f0d8833622b2a15f69d02c1954d14e1
|
4
|
+
data.tar.gz: 116f9f202ca4d9e193f9593d7c0edafd644ee453c28574f69e1dc990d345ea74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15bb65cda600440ea8a2fe3e420a17b4904cd05be9913feca699d34e06ddcd98d067b5c8e77b7041aa2ddbda6993228ce583406cf5d2c234f4465a425b276757
|
7
|
+
data.tar.gz: ca4e8aeca95cfa66121b49e6e4859b3635d84e3d550ec4c405319a37bd666e4404614e98de0a1f092d90ddfad39c7daf5c8732fe5df400c50e1dda17b84fe4e0
|
data/README.md
CHANGED
@@ -10,12 +10,13 @@ To install the stable release:
|
|
10
10
|
gem install libhoney
|
11
11
|
```
|
12
12
|
|
13
|
-
or add `libhoney` to your Gemfile
|
13
|
+
or add `libhoney` to your `Gemfile`:
|
14
14
|
|
15
|
-
```
|
15
|
+
```ruby
|
16
16
|
gem 'libhoney'
|
17
|
+
|
17
18
|
# or, to follow the bleeding edge:
|
18
|
-
#gem 'libhoney', git: 'https://github.com/honeycombio/libhoney-rb.git'
|
19
|
+
# gem 'libhoney', git: 'https://github.com/honeycombio/libhoney-rb.git'
|
19
20
|
```
|
20
21
|
|
21
22
|
This gem has some native dependencies, so if you see an error along the lines of "Failed to build gem native extension", you may need to install the Ruby development headers and a C++ compiler. e.g. on Ubuntu:
|
@@ -24,12 +25,12 @@ This gem has some native dependencies, so if you see an error along the lines of
|
|
24
25
|
sudo apt-get install build-essential ruby-dev
|
25
26
|
```
|
26
27
|
|
27
|
-
Note that libhoney requires Ruby 2.2 or greater.
|
28
|
+
Note that `libhoney` requires Ruby 2.2 or greater.
|
28
29
|
|
29
30
|
|
30
31
|
## Documentation
|
31
32
|
|
32
|
-
An API reference is available at http://www.rubydoc.info/gems/libhoney
|
33
|
+
An API reference is available at [rubydoc.info/gems/libhoney](http://www.rubydoc.info/gems/libhoney).
|
33
34
|
|
34
35
|
## Example Usage
|
35
36
|
|
@@ -41,15 +42,15 @@ require 'libhoney'
|
|
41
42
|
# Create a client instance
|
42
43
|
honeycomb = Libhoney::Client.new(
|
43
44
|
# Use an environment variable to set your write key with something like
|
44
|
-
#
|
45
|
-
:
|
46
|
-
:
|
45
|
+
# `writekey: ENV['HONEYCOMB_WRITEKEY']`,
|
46
|
+
writekey: 'YOUR_WRITE_KEY',
|
47
|
+
dataset: 'honeycomb-ruby-example'
|
47
48
|
)
|
48
49
|
|
49
50
|
honeycomb.send_now({
|
50
|
-
duration_ms:
|
51
|
-
method:
|
52
|
-
hostname:
|
51
|
+
duration_ms: 153.12,
|
52
|
+
method: 'get',
|
53
|
+
hostname: 'appserver15',
|
53
54
|
payload_length: 27
|
54
55
|
})
|
55
56
|
|
@@ -65,7 +66,7 @@ You can find a more complete example demonstrating usage in [`example/fact.rb`](
|
|
65
66
|
|
66
67
|
If you've instrumented your code to send events to Honeycomb, you may want to
|
67
68
|
verify that you're sending the events you expected at the right time with the
|
68
|
-
desired fields. To support this use case, libhoney provides a
|
69
|
+
desired fields. To support this use case, `libhoney` provides a
|
69
70
|
[`LogClient`](http://www.rubydoc.info/gems/libhoney/Libhoney/LogClient) that
|
70
71
|
outputs events to standard error, which you can swap in for the usual `Client`.
|
71
72
|
Example usage:
|
@@ -75,6 +76,7 @@ honeycomb = Libhoney::LogClient.new
|
|
75
76
|
|
76
77
|
my_app = MyApp.new(..., honeycomb, ...)
|
77
78
|
my_app.do_stuff
|
79
|
+
|
78
80
|
# should output events to standard error
|
79
81
|
```
|
80
82
|
|
@@ -90,7 +92,7 @@ annotating them with the right information, etc. That way, if your code changes
|
|
90
92
|
and breaks the instrumentation, you'll find out straight away, instead of at 3am
|
91
93
|
when you need that data available for debugging!
|
92
94
|
|
93
|
-
To support this use case, libhoney provides a
|
95
|
+
To support this use case, `libhoney` provides a
|
94
96
|
[`TestClient`](http://www.rubydoc.info/gems/libhoney/Libhoney/TestClient) which
|
95
97
|
you can swap in for the usual `Client`. Example usage:
|
96
98
|
|
@@ -112,7 +114,7 @@ For more detail see the docs for
|
|
112
114
|
|
113
115
|
## Contributions
|
114
116
|
|
115
|
-
Features, bug fixes and other changes to libhoney are gladly accepted. Please
|
117
|
+
Features, bug fixes and other changes to `libhoney` are gladly accepted. Please
|
116
118
|
open issues or a pull request with your change. Remember to add your name to the
|
117
119
|
CONTRIBUTORS file!
|
118
120
|
|
@@ -3,16 +3,16 @@ require 'libhoney/response'
|
|
3
3
|
module Libhoney
|
4
4
|
# @api private
|
5
5
|
class TransmissionClient
|
6
|
-
def initialize(max_batch_size:
|
7
|
-
send_frequency:
|
8
|
-
max_concurrent_batches:
|
9
|
-
pending_work_capacity:
|
10
|
-
responses:
|
11
|
-
block_on_send:
|
12
|
-
block_on_responses:
|
6
|
+
def initialize(max_batch_size: 50,
|
7
|
+
send_frequency: 100,
|
8
|
+
max_concurrent_batches: 10,
|
9
|
+
pending_work_capacity: 1000,
|
10
|
+
responses: nil,
|
11
|
+
block_on_send: false,
|
12
|
+
block_on_responses: false,
|
13
13
|
user_agent_addition: nil)
|
14
14
|
|
15
|
-
@responses = responses
|
15
|
+
@responses = responses || SizedQueue.new(pending_work_capacity * 2)
|
16
16
|
@block_on_send = block_on_send
|
17
17
|
@block_on_responses = block_on_responses
|
18
18
|
@max_batch_size = max_batch_size
|
data/lib/libhoney/version.rb
CHANGED
data/libhoney.gemspec
CHANGED
@@ -24,11 +24,11 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.required_ruby_version = '>= 2.2.0'
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.7"
|
27
|
-
spec.add_development_dependency "rake", "~>
|
28
|
-
spec.add_development_dependency "webmock", "~>
|
27
|
+
spec.add_development_dependency "rake", "~> 12.3"
|
28
|
+
spec.add_development_dependency "webmock", "~> 3.4"
|
29
29
|
spec.add_development_dependency "minitest", "~> 5.0"
|
30
30
|
spec.add_development_dependency "yard"
|
31
31
|
spec.add_development_dependency "yardstick", "~> 0.9"
|
32
32
|
spec.add_development_dependency "bump", "~> 0.5"
|
33
|
-
spec.add_dependency "http", "
|
33
|
+
spec.add_dependency "http", ">= 2.0", '< 4.0'
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libhoney
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Honeycomb.io Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,28 +30,28 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: webmock
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,16 +112,22 @@ dependencies:
|
|
112
112
|
name: http
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '2.0'
|
118
|
+
- - "<"
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '4.0'
|
118
121
|
type: :runtime
|
119
122
|
prerelease: false
|
120
123
|
version_requirements: !ruby/object:Gem::Requirement
|
121
124
|
requirements:
|
122
|
-
- - "
|
125
|
+
- - ">="
|
123
126
|
- !ruby/object:Gem::Version
|
124
127
|
version: '2.0'
|
128
|
+
- - "<"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '4.0'
|
125
131
|
description: Ruby gem for sending data to Honeycomb
|
126
132
|
email: support@honeycomb.io
|
127
133
|
executables: []
|