libhoney 1.14.7.pre.beta → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -2
- data/.gitignore +2 -0
- data/CHANGELOG.md +35 -0
- data/lib/libhoney/client.rb +6 -32
- data/lib/libhoney/transmission.rb +1 -1
- data/lib/libhoney/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6719a46aa4b4c931245ac715b38067689a74bde968b7608eab89d893cecb3d5b
|
4
|
+
data.tar.gz: 599d25bebae44849f68745be004463a7d35d40d82620c625b81c6506bace3787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1497b4236a659be4a017c8206fc3ae04bb4f569335bdabd8c492e7429a94eb13943e96313bab302dd89e9011457c9f58cc7f004ee7ceac3c4c3d1ca347651d35
|
7
|
+
data.tar.gz: 02a9f65930f3be3d3ccb43817eab5a48c8bd0a5869bd65b7bc8de2b865283e575f35fe6fa88717afb197f514cfebe5196e37d1e293a8fa3d59a5fd0e4d0358f2
|
data/.circleci/config.yml
CHANGED
@@ -147,11 +147,11 @@ workflows:
|
|
147
147
|
- test
|
148
148
|
- publish_github:
|
149
149
|
<<: *filters_publish
|
150
|
-
context: Honeycomb Secrets
|
150
|
+
context: Honeycomb Secrets for Public Repos
|
151
151
|
requires:
|
152
152
|
- build_artifacts
|
153
153
|
- publish_rubygems:
|
154
154
|
<<: *filters_publish
|
155
|
-
context: Honeycomb Secrets
|
155
|
+
context: Honeycomb Secrets for Public Repos
|
156
156
|
requires:
|
157
157
|
- build_artifacts
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,40 @@
|
|
1
1
|
# libhoney-rb changelog
|
2
2
|
|
3
|
+
## changes pending release
|
4
|
+
|
5
|
+
## 1.17.0
|
6
|
+
|
7
|
+
### Fixes:
|
8
|
+
|
9
|
+
- Allow Ruby 3.0.0 (removes overly-pessimistic exception) (#79)
|
10
|
+
|
11
|
+
## 1.16.1
|
12
|
+
|
13
|
+
### Fixes:
|
14
|
+
|
15
|
+
- Fix closing down the client when no threads have been started. (#74 & #76)
|
16
|
+
|
17
|
+
## 1.16.0
|
18
|
+
|
19
|
+
### Fixes:
|
20
|
+
|
21
|
+
- Don't moneypatch Class (#70)
|
22
|
+
|
23
|
+
### Maintenance:
|
24
|
+
|
25
|
+
- Add lockfile to gitignore (#71)
|
26
|
+
|
27
|
+
## 1.15.0
|
28
|
+
|
29
|
+
### Improvements:
|
30
|
+
|
31
|
+
- Do not attempt to send invalid events (#67)
|
32
|
+
|
33
|
+
### Maintenance:
|
34
|
+
|
35
|
+
- Modernize circle, include github publishing (#64)
|
36
|
+
- Update .editorconfig to add new lines to end of files (#68)
|
37
|
+
|
3
38
|
### Misc
|
4
39
|
|
5
40
|
- Added CHANGELOG.md
|
data/lib/libhoney/client.rb
CHANGED
@@ -1,31 +1,10 @@
|
|
1
1
|
require 'time'
|
2
2
|
require 'json'
|
3
3
|
require 'http'
|
4
|
+
require 'forwardable'
|
4
5
|
|
5
6
|
require 'libhoney/null_transmission'
|
6
7
|
|
7
|
-
# Define a few additions that proxy access through Client's builder. Makes Client much tighter.
|
8
|
-
class Class
|
9
|
-
def builder_attr_accessor(*args)
|
10
|
-
args.each do |arg|
|
11
|
-
class_eval("def #{arg};@builder.#{arg};end", __FILE__, __LINE__)
|
12
|
-
class_eval("def #{arg}=(val);@builder.#{arg}=val;end", __FILE__, __LINE__)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def builder_attr_reader(*args)
|
17
|
-
args.each do |arg|
|
18
|
-
class_eval("def #{arg};@builder.#{arg};end", __FILE__, __LINE__)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def builder_attr_writer(*args)
|
23
|
-
args.each do |arg|
|
24
|
-
class_eval("def #{arg}=(val);@builder.#{arg}=val;end", __FILE__, __LINE__)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
8
|
module Libhoney
|
30
9
|
##
|
31
10
|
# This is a library to allow you to send events to Honeycomb from within your
|
@@ -52,6 +31,8 @@ module Libhoney
|
|
52
31
|
# evt.send
|
53
32
|
#
|
54
33
|
class Client
|
34
|
+
extend Forwardable
|
35
|
+
|
55
36
|
API_HOST = 'https://api.honeycomb.io/'.freeze
|
56
37
|
|
57
38
|
# Instantiates libhoney and prepares it to send events to Honeycomb.
|
@@ -89,7 +70,7 @@ module Libhoney
|
|
89
70
|
raise Exception, 'libhoney: max_concurrent_batches must be greater than 0' if max_concurrent_batches < 1
|
90
71
|
raise Exception, 'libhoney: sample rate must be greater than 0' if sample_rate < 1
|
91
72
|
|
92
|
-
unless Gem::Dependency.new('ruby', '
|
73
|
+
unless Gem::Dependency.new('ruby', '>= 2.2').match?('ruby', RUBY_VERSION)
|
93
74
|
raise Exception, 'libhoney: Ruby versions < 2.2 are not supported'
|
94
75
|
end
|
95
76
|
|
@@ -124,19 +105,12 @@ module Libhoney
|
|
124
105
|
@proxy_config = proxy_config
|
125
106
|
end
|
126
107
|
|
127
|
-
builder_attr_accessor :writekey, :dataset, :sample_rate, :api_host
|
128
|
-
|
129
108
|
attr_reader :block_on_send, :block_on_responses, :max_batch_size,
|
130
109
|
:send_frequency, :max_concurrent_batches,
|
131
110
|
:pending_work_capacity, :responses
|
132
111
|
|
133
|
-
|
134
|
-
|
135
|
-
end
|
136
|
-
|
137
|
-
def builder(fields = {}, dyn_fields = {})
|
138
|
-
@builder.builder(fields, dyn_fields)
|
139
|
-
end
|
112
|
+
def_delegators :@builder, :event, :writekey, :writekey=, :dataset, :dataset=,
|
113
|
+
:sample_rate, :sample_rate=, :api_host, :api_host=, :builder
|
140
114
|
|
141
115
|
# Nuke the queue and wait for inflight requests to complete before returning.
|
142
116
|
# If you set drain=false, all queued requests will be dropped on the floor.
|
@@ -136,7 +136,7 @@ module Libhoney
|
|
136
136
|
end
|
137
137
|
|
138
138
|
@batch_queue.enq(nil)
|
139
|
-
@batch_thread.join
|
139
|
+
@batch_thread.join unless @batch_thread.nil?
|
140
140
|
|
141
141
|
# send @threads.length number of nils so each thread will fall out of send_loop
|
142
142
|
@threads.length.times { @send_queue << nil }
|
data/lib/libhoney/version.rb
CHANGED
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.17.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:
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -249,9 +249,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: 2.2.0
|
250
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
251
|
requirements:
|
252
|
-
- - "
|
252
|
+
- - ">="
|
253
253
|
- !ruby/object:Gem::Version
|
254
|
-
version:
|
254
|
+
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubygems_version: 3.1.4
|
257
257
|
signing_key:
|