libhoney 1.14.1 → 1.14.6
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 +28 -1
- data/.editorconfig +12 -0
- data/.github/CODEOWNERS +5 -0
- data/Gemfile.lock +30 -28
- data/lib/libhoney/cleaner.rb +1 -1
- data/lib/libhoney/event.rb +0 -2
- data/lib/libhoney/log_transmission.rb +6 -1
- data/lib/libhoney/transmission.rb +5 -7
- data/lib/libhoney/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8d9eed019d19e668e699fe44dac9c73eef30962568764ac4dabd43a98797cc5
|
4
|
+
data.tar.gz: 8682f2d309dc36df3492101de0d636c782378d8af6d7dbf4f93fcf89a6fde38f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ab159d81ab4c5d4a8c16d05b902c959e81c49fb8b540da32d97c09d3b3e915dc5a9a3f9bae57a9ba165ff2bf3c4ddcd2cf5210a582ac76006e5c31261dda3ef
|
7
|
+
data.tar.gz: 82dcf43a684b5da7cdd042df1198feafdfb1a417ed8e6dd1e3dadb60eb83cf1c04f16f38a06fa3a76fedfc4c55c1c18415eea965e572aeb1d0966e91c9965f18
|
data/.circleci/config.yml
CHANGED
@@ -2,6 +2,13 @@ version: 2.0
|
|
2
2
|
|
3
3
|
test_steps: &test_steps
|
4
4
|
- checkout
|
5
|
+
- run:
|
6
|
+
name: Force Bundler Version
|
7
|
+
command: |
|
8
|
+
sudo gem update --system
|
9
|
+
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
|
10
|
+
source $BASH_ENV
|
11
|
+
gem install bundler
|
5
12
|
- restore_cache:
|
6
13
|
keys:
|
7
14
|
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
@@ -45,10 +52,14 @@ jobs:
|
|
45
52
|
docker:
|
46
53
|
- image: circleci/ruby:2.6
|
47
54
|
steps: *test_steps
|
55
|
+
ruby-2.7:
|
56
|
+
docker:
|
57
|
+
- image: circleci/ruby:2.7
|
58
|
+
steps: *test_steps
|
48
59
|
publish:
|
49
60
|
docker:
|
50
61
|
# Just randomly pick one recent ruby version
|
51
|
-
- image: circleci/ruby:2.
|
62
|
+
- image: circleci/ruby:2.7
|
52
63
|
working_directory: ~/repo
|
53
64
|
steps:
|
54
65
|
- checkout
|
@@ -63,18 +74,34 @@ jobs:
|
|
63
74
|
|
64
75
|
workflows:
|
65
76
|
version: 2
|
77
|
+
nightly:
|
78
|
+
triggers:
|
79
|
+
- schedule:
|
80
|
+
cron: "0 0 * * *"
|
81
|
+
filters:
|
82
|
+
branches:
|
83
|
+
only:
|
84
|
+
- main
|
85
|
+
jobs:
|
86
|
+
- ruby-2.3: *tag_filters
|
87
|
+
- ruby-2.4: *tag_filters
|
88
|
+
- ruby-2.5: *tag_filters
|
89
|
+
- ruby-2.6: *tag_filters
|
90
|
+
- ruby-2.7: *tag_filters
|
66
91
|
build:
|
67
92
|
jobs:
|
68
93
|
- ruby-2.3: *tag_filters
|
69
94
|
- ruby-2.4: *tag_filters
|
70
95
|
- ruby-2.5: *tag_filters
|
71
96
|
- ruby-2.6: *tag_filters
|
97
|
+
- ruby-2.7: *tag_filters
|
72
98
|
- publish:
|
73
99
|
requires:
|
74
100
|
- ruby-2.3
|
75
101
|
- ruby-2.4
|
76
102
|
- ruby-2.5
|
77
103
|
- ruby-2.6
|
104
|
+
- ruby-2.7
|
78
105
|
filters:
|
79
106
|
tags:
|
80
107
|
only: /^v.*/
|
data/.editorconfig
ADDED
data/.github/CODEOWNERS
ADDED
data/Gemfile.lock
CHANGED
@@ -1,47 +1,48 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
libhoney (1.14.
|
4
|
+
libhoney (1.14.6)
|
5
5
|
addressable (~> 2.0)
|
6
6
|
http (>= 2.0, < 5.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
addressable (2.
|
12
|
-
public_suffix (>= 2.0.2, <
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
13
|
ast (2.4.0)
|
14
|
-
backports (3.
|
14
|
+
backports (3.16.0)
|
15
15
|
bump (0.8.0)
|
16
16
|
crack (0.4.3)
|
17
17
|
safe_yaml (~> 1.0.0)
|
18
18
|
domain_name (0.5.20190701)
|
19
19
|
unf (>= 0.0.5, < 1.0.0)
|
20
|
-
ffi (1.
|
20
|
+
ffi (1.13.1)
|
21
21
|
ffi-compiler (1.0.1)
|
22
22
|
ffi (>= 1.0.0)
|
23
23
|
rake
|
24
24
|
hashdiff (1.0.0)
|
25
|
-
http (4.
|
25
|
+
http (4.4.1)
|
26
26
|
addressable (~> 2.3)
|
27
27
|
http-cookie (~> 1.0)
|
28
|
-
http-form_data (~> 2.
|
28
|
+
http-form_data (~> 2.2)
|
29
29
|
http-parser (~> 1.2.0)
|
30
30
|
http-cookie (1.0.3)
|
31
31
|
domain_name (~> 0.5)
|
32
|
-
http-form_data (2.
|
32
|
+
http-form_data (2.3.0)
|
33
33
|
http-parser (1.2.1)
|
34
34
|
ffi-compiler (>= 1.0, < 2.0)
|
35
|
-
jaro_winkler (1.5.
|
36
|
-
minitest (5.
|
37
|
-
multi_json (1.
|
38
|
-
mustermann (1.
|
39
|
-
|
40
|
-
|
35
|
+
jaro_winkler (1.5.4)
|
36
|
+
minitest (5.14.0)
|
37
|
+
multi_json (1.14.1)
|
38
|
+
mustermann (1.1.1)
|
39
|
+
ruby2_keywords (~> 0.0.1)
|
40
|
+
parallel (1.19.1)
|
41
|
+
parser (2.7.0.2)
|
41
42
|
ast (~> 2.4.0)
|
42
|
-
public_suffix (
|
43
|
-
rack (2.
|
44
|
-
rack-protection (2.0.
|
43
|
+
public_suffix (4.0.3)
|
44
|
+
rack (2.1.4)
|
45
|
+
rack-protection (2.0.8.1)
|
45
46
|
rack
|
46
47
|
rainbow (3.0.0)
|
47
48
|
rake (12.3.3)
|
@@ -53,30 +54,31 @@ GEM
|
|
53
54
|
ruby-progressbar (~> 1.7)
|
54
55
|
unicode-display_width (>= 1.4.0, < 1.6)
|
55
56
|
ruby-progressbar (1.10.1)
|
57
|
+
ruby2_keywords (0.0.2)
|
56
58
|
safe_yaml (1.0.5)
|
57
|
-
sinatra (2.0.
|
59
|
+
sinatra (2.0.8.1)
|
58
60
|
mustermann (~> 1.0)
|
59
61
|
rack (~> 2.0)
|
60
|
-
rack-protection (= 2.0.
|
62
|
+
rack-protection (= 2.0.8.1)
|
61
63
|
tilt (~> 2.0)
|
62
|
-
sinatra-contrib (2.0.
|
64
|
+
sinatra-contrib (2.0.8.1)
|
63
65
|
backports (>= 2.8.2)
|
64
66
|
multi_json
|
65
67
|
mustermann (~> 1.0)
|
66
|
-
rack-protection (= 2.0.
|
67
|
-
sinatra (= 2.0.
|
68
|
-
tilt (
|
68
|
+
rack-protection (= 2.0.8.1)
|
69
|
+
sinatra (= 2.0.8.1)
|
70
|
+
tilt (~> 2.0)
|
69
71
|
spy (1.0.0)
|
70
|
-
tilt (2.0.
|
72
|
+
tilt (2.0.10)
|
71
73
|
unf (0.1.4)
|
72
74
|
unf_ext
|
73
|
-
unf_ext (0.0.7.
|
75
|
+
unf_ext (0.0.7.7)
|
74
76
|
unicode-display_width (1.5.0)
|
75
|
-
webmock (3.
|
77
|
+
webmock (3.8.1)
|
76
78
|
addressable (>= 2.3.6)
|
77
79
|
crack (>= 0.3.2)
|
78
80
|
hashdiff (>= 0.4.0, < 2.0.0)
|
79
|
-
yard (0.9.
|
81
|
+
yard (0.9.24)
|
80
82
|
yardstick (0.9.9)
|
81
83
|
yard (~> 0.8, >= 0.8.7.2)
|
82
84
|
|
@@ -98,4 +100,4 @@ DEPENDENCIES
|
|
98
100
|
yardstick (~> 0.9)
|
99
101
|
|
100
102
|
BUNDLED WITH
|
101
|
-
1.
|
103
|
+
2.1.4
|
data/lib/libhoney/cleaner.rb
CHANGED
data/lib/libhoney/event.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'json'
|
2
|
+
require 'libhoney/cleaner'
|
2
3
|
|
3
4
|
module Libhoney
|
4
5
|
# For debugging use: a mock version of TransmissionClient that simply prints
|
@@ -9,6 +10,8 @@ module Libhoney
|
|
9
10
|
# to verify what events your instrumented code is sending. Use in
|
10
11
|
# production is not recommended.
|
11
12
|
class LogTransmissionClient
|
13
|
+
include Cleaner
|
14
|
+
|
12
15
|
def initialize(output:, verbose: false)
|
13
16
|
@output = output
|
14
17
|
@verbose = verbose
|
@@ -21,7 +24,9 @@ module Libhoney
|
|
21
24
|
metadata << " (sample rate: #{event.sample_rate})" if event.sample_rate != 1
|
22
25
|
@output.print("#{metadata} | ")
|
23
26
|
end
|
24
|
-
|
27
|
+
clean_data(event.data).tap do |data|
|
28
|
+
@output.puts(data.to_json)
|
29
|
+
end
|
25
30
|
end
|
26
31
|
|
27
32
|
# Flushes the output (but does not close it)
|
@@ -40,10 +40,6 @@ module Libhoney
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def add(event)
|
43
|
-
raise ArgumentError, "No APIHost for Honeycomb. Can't send to the Great Unknown." if event.api_host == ''
|
44
|
-
raise ArgumentError, "No WriteKey specified. Can't send event." if event.writekey == ''
|
45
|
-
raise ArgumentError, "No Dataset for Honeycomb. Can't send datasetless." if event.dataset == ''
|
46
|
-
|
47
43
|
begin
|
48
44
|
@batch_queue.enq(event, !@block_on_send)
|
49
45
|
rescue ThreadError
|
@@ -139,9 +135,11 @@ module Libhoney
|
|
139
135
|
|
140
136
|
loop do
|
141
137
|
begin
|
142
|
-
|
143
|
-
|
144
|
-
|
138
|
+
Thread.handle_interrupt(Timeout::Error => :on_blocking) do
|
139
|
+
while (event = Timeout.timeout(@send_frequency) { @batch_queue.pop })
|
140
|
+
key = [event.api_host, event.writekey, event.dataset]
|
141
|
+
batched_events[key] << event
|
142
|
+
end
|
145
143
|
end
|
146
144
|
|
147
145
|
break
|
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.14.
|
4
|
+
version: 1.14.6
|
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: 2020-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bump
|
@@ -206,6 +206,8 @@ extra_rdoc_files: []
|
|
206
206
|
files:
|
207
207
|
- ".circleci/config.yml"
|
208
208
|
- ".circleci/setup-rubygems.sh"
|
209
|
+
- ".editorconfig"
|
210
|
+
- ".github/CODEOWNERS"
|
209
211
|
- ".gitignore"
|
210
212
|
- ".rubocop.yml"
|
211
213
|
- ".rubocop_todo.yml"
|
@@ -251,7 +253,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
253
|
- !ruby/object:Gem::Version
|
252
254
|
version: '0'
|
253
255
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
256
|
+
rubygems_version: 3.1.2
|
255
257
|
signing_key:
|
256
258
|
specification_version: 4
|
257
259
|
summary: send data to Honeycomb
|