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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33a6704df45d16dde8f8b96b17e45c555a135af451d6db7f9c0e71d42ead12c5
4
- data.tar.gz: 290c100a7dc4ceeda3db9e87f5f75d95bce5234dcecc7d42be29b0c79d18bdf2
3
+ metadata.gz: deebe936665edd1d51d0526c7089c0bfa29e666722f8ccff89bf731ce3fd5def
4
+ data.tar.gz: 9f4534f0b56c15c113a9c72d9e7b237a243c6ab6208af1bda1f1c79b02b1c7c8
5
5
  SHA512:
6
- metadata.gz: ea45bf6ae6776d2f85ff462f55f35c05f1eba40b8b2436870528c2a1036dd21cfe3bbc5b74ac8997fb8c82556fc1abb076cba7e6351afff2e13ae1344c50f502
7
- data.tar.gz: ecb6939066d27472c37b3752dc83b28ac45cbc45ee2610aabd6c612e8bb88c32785e64c8e67bf42125803097c4b27645043133889b24782e5b7eb2322d97ce5c
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' -i $(rvm gemdir) -ax bundler
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
@@ -0,0 +1,3 @@
1
+ mkdir ~/.gem
2
+ echo -e "---\r\n:rubygems_api_key: $GEM_HOST_API_KEY" > ~/.gem/credentials
3
+ chmod 0600 /home/circleci/.gem/credentials
@@ -22,6 +22,8 @@ Metrics/ClassLength:
22
22
 
23
23
  Metrics/MethodLength:
24
24
  Max: 25
25
+ Exclude:
26
+ - lib/generators/honeycomb/honeycomb_generator.rb
25
27
 
26
28
  Metrics/LineLength:
27
29
  Exclude:
data/Appraisals CHANGED
@@ -1,7 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise "faraday" do
4
- gem "faraday"
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
@@ -1,3 +1,4 @@
1
1
  # Contributors
2
2
 
3
- Sergio Mira
3
+ * Sergio Mira
4
+ * Alex Vondrak - [@ajvondrak](https://github.com/ajvondrak)
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- honeycomb-beeline (1.1.0)
5
- libhoney (~> 1.8)
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.6.0)
11
- public_suffix (>= 2.0.2, < 4.0)
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.8.0)
19
- byebug (11.0.1)
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.11.1)
30
- hashdiff (0.4.0)
31
- http (4.1.1)
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.0)
35
- http_parser.rb (~> 0.6.0)
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.1.1)
39
- http_parser.rb (0.6.0)
40
- iniparse (1.4.4)
41
- jaro_winkler (1.5.3)
42
- json (2.2.0)
43
- libhoney (1.14.0)
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.17.0)
51
- parser (2.6.3.0)
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 (3.1.1)
62
+ public_suffix (4.0.4)
60
63
  rainbow (3.0.0)
61
- rake (12.3.2)
62
- rspec (3.8.0)
63
- rspec-core (~> 3.8.0)
64
- rspec-expectations (~> 3.8.0)
65
- rspec-mocks (~> 3.8.0)
66
- rspec-core (3.8.1)
67
- rspec-support (~> 3.8.0)
68
- rspec-expectations (3.8.4)
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.8.0)
71
- rspec-mocks (3.8.1)
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.8.0)
74
- rspec-support (3.8.2)
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.16.1)
89
+ simplecov (0.18.5)
87
90
  docile (~> 1.1)
88
- json (>= 1.8, < 3)
89
- simplecov-html (~> 0.10.0)
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.10.2)
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.20.3)
99
+ thor (1.0.1)
98
100
  unf (0.1.4)
99
101
  unf_ext
100
- unf_ext (0.0.7.6)
102
+ unf_ext (0.0.7.7)
101
103
  unicode-display_width (1.5.0)
102
- webmock (3.6.0)
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-byebug
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.0.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://travis-ci.org/honeycombio/beeline-ruby.svg?branch=master)](https://travis-ci.org/honeycombio/beeline-ruby)
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
 
@@ -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.8"
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-byebug"
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