honeycomb-beeline 1.1.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{bundler_version.sh → .circleci/bundler_version.sh} +1 -2
- data/.circleci/config.yml +132 -0
- data/.circleci/setup-rubygems.sh +3 -0
- data/.rubocop.yml +2 -0
- data/Appraisals +27 -2
- data/CONTRIBUTORS.md +2 -1
- data/Gemfile.lock +45 -42
- data/README.md +3 -1
- data/honeycomb-beeline.gemspec +3 -2
- data/lib/generators/honeycomb/honeycomb_generator.rb +14 -0
- data/lib/honeycomb-beeline.rb +4 -1
- data/lib/honeycomb/beeline/version.rb +1 -1
- data/lib/honeycomb/client.rb +22 -11
- data/lib/honeycomb/configuration.rb +1 -1
- data/lib/honeycomb/integrations/active_support.rb +14 -2
- data/lib/honeycomb/integrations/aws.rb +400 -0
- data/lib/honeycomb/integrations/faraday.rb +1 -1
- data/lib/honeycomb/integrations/rack.rb +15 -4
- data/lib/honeycomb/integrations/rails.rb +67 -11
- data/lib/honeycomb/integrations/railtie.rb +2 -3
- data/lib/honeycomb/integrations/redis.rb +356 -0
- data/lib/honeycomb/integrations/warden.rb +2 -2
- metadata +34 -12
- data/.travis.yml +0 -57
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: deebe936665edd1d51d0526c7089c0bfa29e666722f8ccff89bf731ce3fd5def
|
4
|
+
data.tar.gz: 9f4534f0b56c15c113a9c72d9e7b237a243c6ab6208af1bda1f1c79b02b1c7c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9a2f7c6a0c3bc6b92a82672aaeaf2a24a02c703d9830670448acaac6838b7286c91d33af3d9a20049891bde140f1aac1c6f7b615b92b7aa37a0f1f69ab3bddd
|
7
|
+
data.tar.gz: 65f892432bc418c44d3bb482b8892a5cc0dccbf0a24ff8f051c78de4769e7e61a5d0efdb6b39b015beb759da0be9354eefb3420133d8670477c7b36f63c3ea1f
|
@@ -3,7 +3,6 @@
|
|
3
3
|
set -ux
|
4
4
|
|
5
5
|
if [[ "$BUNDLE_GEMFILE" =~ (rails_41.gemfile|rails_42.gemfile)$ ]]; then
|
6
|
-
gem uninstall -v '>= 2' -
|
7
|
-
gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler
|
6
|
+
gem uninstall -v '>= 2' -ax bundler
|
8
7
|
gem install bundler -v '< 2'
|
9
8
|
fi
|
@@ -0,0 +1,132 @@
|
|
1
|
+
version: 2.1
|
2
|
+
commands:
|
3
|
+
ruby:
|
4
|
+
parameters:
|
5
|
+
ruby-version:
|
6
|
+
type: string
|
7
|
+
gemfile:
|
8
|
+
type: string
|
9
|
+
default: Gemfile
|
10
|
+
command:
|
11
|
+
type: string
|
12
|
+
default: bundle exec rake test
|
13
|
+
steps:
|
14
|
+
- checkout
|
15
|
+
- restore_cache:
|
16
|
+
keys:
|
17
|
+
- gems-v1-<< parameters.ruby-version >>-{{ checksum "Gemfile.lock" }}
|
18
|
+
- gems-v1-<< parameters.ruby-version >>
|
19
|
+
- run: gem update bundler
|
20
|
+
- run: BUNDLE_GEMFILE=<< parameters.gemfile >> ./.circleci/bundler_version.sh
|
21
|
+
- run: BUNDLE_GEMFILE=<< parameters.gemfile >> bundle install --jobs=4 --retry=3 --path vendor/bundle
|
22
|
+
- save_cache:
|
23
|
+
paths:
|
24
|
+
- ./vendor/bundle
|
25
|
+
key: gems-v1-<< parameters.ruby-version >>-{{ checksum "Gemfile.lock" }}
|
26
|
+
- run: BUNDLE_GEMFILE=<< parameters.gemfile >> << parameters.command >>
|
27
|
+
|
28
|
+
jobs:
|
29
|
+
publish:
|
30
|
+
docker:
|
31
|
+
- image: circleci/ruby:2.6
|
32
|
+
steps:
|
33
|
+
- checkout
|
34
|
+
- run:
|
35
|
+
name: Setup Rubygems
|
36
|
+
command: bash .circleci/setup-rubygems.sh
|
37
|
+
- run: gem build honeycomb-beeline.gemspec
|
38
|
+
- run: gem push honeycomb-beeline-*.gem
|
39
|
+
lint:
|
40
|
+
parameters:
|
41
|
+
ruby-version:
|
42
|
+
type: string
|
43
|
+
default: "2.6"
|
44
|
+
docker:
|
45
|
+
- image: circleci/ruby:<< parameters.ruby-version >>
|
46
|
+
steps:
|
47
|
+
- ruby:
|
48
|
+
ruby-version: << parameters.ruby-version >>
|
49
|
+
command: bundle exec rake rubocop
|
50
|
+
test:
|
51
|
+
parameters:
|
52
|
+
gemfile:
|
53
|
+
type: string
|
54
|
+
ruby-version:
|
55
|
+
type: string
|
56
|
+
docker:
|
57
|
+
- image: circleci/ruby:<< parameters.ruby-version >>
|
58
|
+
steps:
|
59
|
+
- ruby:
|
60
|
+
ruby-version: << parameters.ruby-version >>
|
61
|
+
gemfile: << parameters.gemfile >>
|
62
|
+
command: bundle exec rake test
|
63
|
+
|
64
|
+
workflows:
|
65
|
+
nightly:
|
66
|
+
triggers:
|
67
|
+
- schedule:
|
68
|
+
cron: "0 0 * * *"
|
69
|
+
filters:
|
70
|
+
branches:
|
71
|
+
only:
|
72
|
+
- master
|
73
|
+
jobs:
|
74
|
+
- lint
|
75
|
+
- test: &test
|
76
|
+
requires:
|
77
|
+
- lint
|
78
|
+
matrix:
|
79
|
+
parameters:
|
80
|
+
ruby-version: ["2.3", "2.4", "2.5", "2.6", "2.7"]
|
81
|
+
gemfile:
|
82
|
+
- gemfiles/aws_2.gemfile
|
83
|
+
- gemfiles/aws_3.gemfile
|
84
|
+
- gemfiles/faraday_0.gemfile
|
85
|
+
- gemfiles/faraday_1.gemfile
|
86
|
+
- gemfiles/sequel4.gemfile
|
87
|
+
- gemfiles/sequel5.gemfile
|
88
|
+
- gemfiles/sinatra.gemfile
|
89
|
+
- gemfiles/rack.gemfile
|
90
|
+
- gemfiles/rails_41.gemfile
|
91
|
+
- gemfiles/rails_42.gemfile
|
92
|
+
- gemfiles/rails_5.gemfile
|
93
|
+
- gemfiles/rails_51.gemfile
|
94
|
+
- gemfiles/rails_52.gemfile
|
95
|
+
- gemfiles/rails_6.gemfile
|
96
|
+
- gemfiles/redis_3.gemfile
|
97
|
+
- gemfiles/redis_4.gemfile
|
98
|
+
exclude:
|
99
|
+
- ruby-version: "2.3"
|
100
|
+
gemfile: gemfiles/rails_6.gemfile
|
101
|
+
- ruby-version: "2.4"
|
102
|
+
gemfile: gemfiles/rails_6.gemfile
|
103
|
+
- ruby-version: "2.4"
|
104
|
+
gemfile: gemfiles/rails_41.gemfile
|
105
|
+
- ruby-version: "2.5"
|
106
|
+
gemfile: gemfiles/rails_41.gemfile
|
107
|
+
- ruby-version: "2.6"
|
108
|
+
gemfile: gemfiles/rails_41.gemfile
|
109
|
+
- ruby-version: "2.7"
|
110
|
+
gemfile: gemfiles/rails_41.gemfile
|
111
|
+
- ruby-version: "2.7"
|
112
|
+
gemfile: gemfiles/rails_42.gemfile
|
113
|
+
beeline:
|
114
|
+
jobs:
|
115
|
+
- lint:
|
116
|
+
filters:
|
117
|
+
tags:
|
118
|
+
only: /.*/
|
119
|
+
- test:
|
120
|
+
<<: *test
|
121
|
+
filters:
|
122
|
+
tags:
|
123
|
+
only: /.*/
|
124
|
+
- publish:
|
125
|
+
filters:
|
126
|
+
tags:
|
127
|
+
only: /^v.*/
|
128
|
+
branches:
|
129
|
+
ignore: /.*/
|
130
|
+
requires:
|
131
|
+
- lint
|
132
|
+
- test
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
@@ -1,7 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise "
|
4
|
-
gem "
|
3
|
+
appraise "aws-2" do
|
4
|
+
gem "aws-sdk", "~> 2"
|
5
|
+
end
|
6
|
+
|
7
|
+
appraise "aws-3" do
|
8
|
+
gem "aws-sdk", "~> 3"
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise "faraday-0" do
|
12
|
+
gem "faraday", "~> 0"
|
13
|
+
end
|
14
|
+
|
15
|
+
appraise "faraday-1" do
|
16
|
+
gem "faraday", "~> 1"
|
5
17
|
end
|
6
18
|
|
7
19
|
appraise "sequel4" do
|
@@ -27,30 +39,35 @@ end
|
|
27
39
|
appraise "rails-41" do
|
28
40
|
gem "rack-test"
|
29
41
|
gem "rails", "~> 4.1.0"
|
42
|
+
gem "sprockets", "~> 3"
|
30
43
|
gem "warden"
|
31
44
|
end
|
32
45
|
|
33
46
|
appraise "rails-42" do
|
34
47
|
gem "rack-test"
|
35
48
|
gem "rails", "~> 4.2.0"
|
49
|
+
gem "sprockets", "~> 3"
|
36
50
|
gem "warden"
|
37
51
|
end
|
38
52
|
|
39
53
|
appraise "rails-5" do
|
40
54
|
gem "rack-test"
|
41
55
|
gem "rails", "~> 5.0.0"
|
56
|
+
gem "sprockets", "~> 3"
|
42
57
|
gem "warden"
|
43
58
|
end
|
44
59
|
|
45
60
|
appraise "rails-51" do
|
46
61
|
gem "rack-test"
|
47
62
|
gem "rails", "~> 5.1.0"
|
63
|
+
gem "sprockets", "~> 3"
|
48
64
|
gem "warden"
|
49
65
|
end
|
50
66
|
|
51
67
|
appraise "rails-52" do
|
52
68
|
gem "rack-test"
|
53
69
|
gem "rails", "~> 5.2.0"
|
70
|
+
gem "sprockets", "~> 3"
|
54
71
|
gem "warden"
|
55
72
|
end
|
56
73
|
|
@@ -59,3 +76,11 @@ appraise "rails-6" do
|
|
59
76
|
gem "rails", "~> 6.0.0"
|
60
77
|
gem "warden"
|
61
78
|
end
|
79
|
+
|
80
|
+
appraise "redis-3" do
|
81
|
+
gem "redis", "~> 3"
|
82
|
+
end
|
83
|
+
|
84
|
+
appraise "redis-4" do
|
85
|
+
gem "redis", "~> 4"
|
86
|
+
end
|
data/CONTRIBUTORS.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
honeycomb-beeline (
|
5
|
-
libhoney (~> 1.
|
4
|
+
honeycomb-beeline (2.1.0)
|
5
|
+
libhoney (~> 1.14, >= 1.14.2)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
addressable (2.
|
11
|
-
public_suffix (>= 2.0.2, <
|
10
|
+
addressable (2.7.0)
|
11
|
+
public_suffix (>= 2.0.2, < 5.0)
|
12
12
|
ansi (1.5.0)
|
13
13
|
appraisal (2.2.0)
|
14
14
|
bundler
|
15
15
|
rake
|
16
16
|
thor (>= 0.14.0)
|
17
17
|
ast (2.4.0)
|
18
|
-
bump (0.
|
19
|
-
byebug (11.
|
18
|
+
bump (0.9.0)
|
19
|
+
byebug (11.1.3)
|
20
20
|
childprocess (0.9.0)
|
21
21
|
ffi (~> 1.0, >= 1.0.11)
|
22
22
|
coderay (1.1.2)
|
@@ -26,29 +26,32 @@ GEM
|
|
26
26
|
docile (1.3.2)
|
27
27
|
domain_name (0.5.20190701)
|
28
28
|
unf (>= 0.0.5, < 1.0.0)
|
29
|
-
ffi (1.
|
30
|
-
|
31
|
-
|
29
|
+
ffi (1.12.2)
|
30
|
+
ffi-compiler (1.0.1)
|
31
|
+
ffi (>= 1.0.0)
|
32
|
+
rake
|
33
|
+
hashdiff (1.0.1)
|
34
|
+
http (4.4.1)
|
32
35
|
addressable (~> 2.3)
|
33
36
|
http-cookie (~> 1.0)
|
34
|
-
http-form_data (~> 2.
|
35
|
-
|
37
|
+
http-form_data (~> 2.2)
|
38
|
+
http-parser (~> 1.2.0)
|
36
39
|
http-cookie (1.0.3)
|
37
40
|
domain_name (~> 0.5)
|
38
|
-
http-form_data (2.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
libhoney (1.14.
|
41
|
+
http-form_data (2.3.0)
|
42
|
+
http-parser (1.2.1)
|
43
|
+
ffi-compiler (>= 1.0, < 2.0)
|
44
|
+
iniparse (1.5.0)
|
45
|
+
jaro_winkler (1.5.4)
|
46
|
+
libhoney (1.14.4)
|
44
47
|
addressable (~> 2.0)
|
45
48
|
http (>= 2.0, < 5.0)
|
46
49
|
method_source (0.9.2)
|
47
50
|
overcommit (0.46.0)
|
48
51
|
childprocess (~> 0.6, >= 0.6.3)
|
49
52
|
iniparse (~> 1.4)
|
50
|
-
parallel (1.
|
51
|
-
parser (2.
|
53
|
+
parallel (1.19.1)
|
54
|
+
parser (2.7.1.2)
|
52
55
|
ast (~> 2.4.0)
|
53
56
|
pry (0.12.2)
|
54
57
|
coderay (~> 1.1.0)
|
@@ -56,22 +59,22 @@ GEM
|
|
56
59
|
pry-byebug (3.7.0)
|
57
60
|
byebug (~> 11.0)
|
58
61
|
pry (~> 0.10)
|
59
|
-
public_suffix (
|
62
|
+
public_suffix (4.0.4)
|
60
63
|
rainbow (3.0.0)
|
61
|
-
rake (
|
62
|
-
rspec (3.
|
63
|
-
rspec-core (~> 3.
|
64
|
-
rspec-expectations (~> 3.
|
65
|
-
rspec-mocks (~> 3.
|
66
|
-
rspec-core (3.
|
67
|
-
rspec-support (~> 3.
|
68
|
-
rspec-expectations (3.
|
64
|
+
rake (13.0.1)
|
65
|
+
rspec (3.9.0)
|
66
|
+
rspec-core (~> 3.9.0)
|
67
|
+
rspec-expectations (~> 3.9.0)
|
68
|
+
rspec-mocks (~> 3.9.0)
|
69
|
+
rspec-core (3.9.2)
|
70
|
+
rspec-support (~> 3.9.3)
|
71
|
+
rspec-expectations (3.9.2)
|
69
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
|
-
rspec-support (~> 3.
|
71
|
-
rspec-mocks (3.
|
73
|
+
rspec-support (~> 3.9.0)
|
74
|
+
rspec-mocks (3.9.1)
|
72
75
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
-
rspec-support (~> 3.
|
74
|
-
rspec-support (3.
|
76
|
+
rspec-support (~> 3.9.0)
|
77
|
+
rspec-support (3.9.3)
|
75
78
|
rubocop (0.68.1)
|
76
79
|
jaro_winkler (~> 1.5.1)
|
77
80
|
parallel (~> 1.10)
|
@@ -83,23 +86,22 @@ GEM
|
|
83
86
|
rubocop (>= 0.68.0)
|
84
87
|
ruby-progressbar (1.10.1)
|
85
88
|
safe_yaml (1.0.5)
|
86
|
-
simplecov (0.
|
89
|
+
simplecov (0.18.5)
|
87
90
|
docile (~> 1.1)
|
88
|
-
|
89
|
-
|
90
|
-
simplecov-console (0.5.0)
|
91
|
+
simplecov-html (~> 0.11)
|
92
|
+
simplecov-console (0.7.2)
|
91
93
|
ansi
|
92
94
|
simplecov
|
93
95
|
terminal-table
|
94
|
-
simplecov-html (0.
|
96
|
+
simplecov-html (0.12.2)
|
95
97
|
terminal-table (1.8.0)
|
96
98
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
97
|
-
thor (0.
|
99
|
+
thor (1.0.1)
|
98
100
|
unf (0.1.4)
|
99
101
|
unf_ext
|
100
|
-
unf_ext (0.0.7.
|
102
|
+
unf_ext (0.0.7.7)
|
101
103
|
unicode-display_width (1.5.0)
|
102
|
-
webmock (3.
|
104
|
+
webmock (3.8.3)
|
103
105
|
addressable (>= 2.3.6)
|
104
106
|
crack (>= 0.3.2)
|
105
107
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -113,7 +115,8 @@ DEPENDENCIES
|
|
113
115
|
bundler
|
114
116
|
honeycomb-beeline!
|
115
117
|
overcommit (~> 0.46.0)
|
116
|
-
pry
|
118
|
+
pry (< 0.13.0)
|
119
|
+
pry-byebug (~> 3.7.0)
|
117
120
|
rake
|
118
121
|
rspec (~> 3.0)
|
119
122
|
rubocop (< 0.69)
|
@@ -123,4 +126,4 @@ DEPENDENCIES
|
|
123
126
|
webmock
|
124
127
|
|
125
128
|
BUNDLED WITH
|
126
|
-
2.
|
129
|
+
2.1.4
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Honeycomb Beeline for Ruby
|
2
2
|
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://circleci.com/gh/honeycombio/beeline-ruby.svg?style=svg)](https://circleci.com/gh/honeycombio/beeline-ruby)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/honeycomb-beeline.svg)](https://badge.fury.io/rb/honeycomb-beeline)
|
5
5
|
|
6
6
|
This package makes it easy to instrument your Ruby web app to send useful events to [Honeycomb](https://www.honeycomb.io), a service for debugging your software in production.
|
@@ -16,9 +16,11 @@ Requires Ruby version 2.3 or later
|
|
16
16
|
Built in instrumentation for:
|
17
17
|
|
18
18
|
- Active Support
|
19
|
+
- AWS (v2 and v3)
|
19
20
|
- Faraday
|
20
21
|
- Rack
|
21
22
|
- Rails (tested on versions 4.1 and up)
|
23
|
+
- Redis (tested on versions 3.x and 4.x)
|
22
24
|
- Sequel
|
23
25
|
- Sinatra
|
24
26
|
|
data/honeycomb-beeline.gemspec
CHANGED
@@ -37,13 +37,14 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
38
38
|
spec.require_paths = ["lib"]
|
39
39
|
|
40
|
-
spec.add_dependency "libhoney", "~> 1.
|
40
|
+
spec.add_dependency "libhoney", ">= 1.14.2", "~> 1.14"
|
41
41
|
|
42
42
|
spec.add_development_dependency "appraisal"
|
43
43
|
spec.add_development_dependency "bump"
|
44
44
|
spec.add_development_dependency "bundler"
|
45
45
|
spec.add_development_dependency "overcommit", "~> 0.46.0"
|
46
|
-
spec.add_development_dependency "pry
|
46
|
+
spec.add_development_dependency "pry", "< 0.13.0"
|
47
|
+
spec.add_development_dependency "pry-byebug", "~> 3.7.0"
|
47
48
|
spec.add_development_dependency "rake"
|
48
49
|
spec.add_development_dependency "rspec", "~> 3.0"
|
49
50
|
spec.add_development_dependency "rubocop", "< 0.69"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rails/generators"
|
4
|
+
require "active_support/core_ext/string/strip"
|
4
5
|
|
5
6
|
##
|
6
7
|
# Generates an intializer for configuring the Honeycomb beeline
|
@@ -22,6 +23,19 @@ class HoneycombGenerator < Rails::Generators::Base
|
|
22
23
|
Honeycomb.configure do |config|
|
23
24
|
config.write_key = #{write_key.inspect}
|
24
25
|
config.dataset = #{options['dataset'].inspect}
|
26
|
+
config.presend_hook do |fields|
|
27
|
+
if fields["name"] == "redis" && fields.has_key?("redis.command")
|
28
|
+
# remove potential PII from the redis command
|
29
|
+
if fields["redis.command"].respond_to? :split
|
30
|
+
fields["redis.command"] = fields["redis.command"].split.first
|
31
|
+
end
|
32
|
+
end
|
33
|
+
if fields["name"] == "sql.active_record"
|
34
|
+
# remove potential PII from the active record events
|
35
|
+
fields.delete("sql.active_record.binds")
|
36
|
+
fields.delete("sql.active_record.type_casted_binds")
|
37
|
+
end
|
38
|
+
end
|
25
39
|
config.notification_events = %w[
|
26
40
|
sql.active_record
|
27
41
|
render_template.action_view
|