newrelic_rpm 8.10.0 → 8.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +12 -3
  4. data/.rubocop_todo.yml +243 -0
  5. data/.simplecov +9 -2
  6. data/CHANGELOG.md +23 -1
  7. data/Thorfile +6 -0
  8. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +8 -4
  9. data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +0 -8
  10. data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +10 -8
  11. data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +0 -5
  12. data/lib/new_relic/agent/instrumentation/grpc/helper.rb +2 -0
  13. data/lib/new_relic/agent/threading/agent_thread.rb +10 -6
  14. data/lib/new_relic/agent/tracer.rb +5 -3
  15. data/lib/new_relic/control/frameworks/external.rb +0 -0
  16. data/lib/new_relic/control/frameworks/sinatra.rb +0 -0
  17. data/lib/new_relic/language_support.rb +5 -0
  18. data/lib/new_relic/version.rb +1 -1
  19. data/lib/tasks/coverage_report.rake +21 -11
  20. data/lib/tasks/instrumentation_generator/README.md +63 -0
  21. data/lib/tasks/instrumentation_generator/TODO.md +33 -0
  22. data/lib/tasks/instrumentation_generator/instrumentation.thor +96 -0
  23. data/lib/tasks/instrumentation_generator/templates/Envfile.tt +10 -0
  24. data/lib/tasks/instrumentation_generator/templates/chain.tt +22 -0
  25. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +7 -0
  26. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +30 -0
  27. data/lib/tasks/instrumentation_generator/templates/instrumentation.tt +13 -0
  28. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +3 -0
  29. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +19 -0
  30. data/lib/tasks/instrumentation_generator/templates/prepend.tt +14 -0
  31. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +3 -0
  32. data/lib/tasks/instrumentation_generator/templates/test.tt +16 -0
  33. data/newrelic_rpm.gemspec +13 -17
  34. data/test/agent_helper.rb +5 -19
  35. metadata +41 -98
  36. data/bin/mongrel_rpm +0 -33
@@ -0,0 +1,33 @@
1
+ # TODO
2
+
3
+ # - [X] Create instrumentation file
4
+
5
+ # - [X] Create chain file
6
+
7
+ # - [X] Create prepend file
8
+
9
+ # - [X] Create dependency detection file
10
+
11
+ # - [X] Add config to default source
12
+
13
+ # - [X] Create multiverse suite
14
+
15
+ # - [X] Create Envfile
16
+
17
+ # - [X] Create test file with examples
18
+
19
+ # - [X] Create option for method names to instrument
20
+
21
+ # - [X] Add entry to newrelic.yml
22
+
23
+ # - [ ] Append a new method to instrument to an existing instrumentation class (with tests?)
24
+
25
+ # - [ ] Documentation: examples of what to add in each gap
26
+
27
+ # - [ ] Good examples of tests, instrumentation, etc. as comments
28
+
29
+ # - [ ] Handle multi-word gem names (camel case for classes, handle hyphens, concurrent-ruby as example)
30
+
31
+ # - [ ] Make sure multiple arguments can be passed to the command line
32
+
33
+ # - [ ] Add tests
@@ -0,0 +1,96 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ require_relative '../../new_relic/language_support'
7
+ require 'thor'
8
+
9
+ class Instrumentation < Thor
10
+ include Thor::Actions
11
+
12
+ INSTRUMENTATION_ROOT = 'lib/new_relic/agent/instrumentation/'
13
+ MULTIVERSE_SUITE_ROOT = 'test/multiverse/suites/'
14
+ DEFAULT_SOURCE_LOCATION = 'lib/new_relic/agent/configuration/default_source.rb'
15
+
16
+ desc('scaffold NAME', 'Scaffold the required files for adding new instrumentation')
17
+ long_desc <<-LONGDESC
18
+ `instrumentation scaffold` requires one parameter by default: the name of the
19
+ library or class you are instrumenting. This task generates the basic
20
+ file structure needed to add new instrumentation to the Ruby agent.
21
+ LONGDESC
22
+
23
+ source_root(File.dirname(__FILE__))
24
+
25
+ option :method,
26
+ default: 'method_to_instrument',
27
+ desc: 'The method you would like to prepend or chain instrumentation onto'
28
+ option :args,
29
+ default: '*args',
30
+ desc: 'The arguments associated with the original method'
31
+
32
+ def scaffold(name)
33
+ @name = name
34
+ @method = options[:method] if options[:method]
35
+ @args = options[:args] if options[:args]
36
+ @class_name = ::NewRelic::LanguageSupport.camelize(name)
37
+ base_path = "#{INSTRUMENTATION_ROOT}#{name.downcase}"
38
+ empty_directory(base_path)
39
+
40
+ ['chain', 'instrumentation', 'prepend'].each do |file|
41
+ template("templates/#{file}.tt", "#{base_path}/#{file}.rb")
42
+ end
43
+
44
+ template('templates/dependency_detection.tt', "#{base_path}.rb")
45
+ create_configuration(name)
46
+ create_tests(name)
47
+ end
48
+
49
+ desc 'add_new_method NAME', 'Inserts a new method into an existing piece of instrumentation'
50
+
51
+ option :method, required: true, desc: 'The name of the method to instrument'
52
+ option :args, default: '*args', desc: 'The arguments associated with the instrumented method'
53
+
54
+ def add_new_method(name, method_name)
55
+ # Verify that existing instrumentation exists
56
+ # if it doesn't, should we just call the #scaffold method instead since we have all the stuff
57
+ # otherwise, inject the new method into the instrumentation matching the first arg
58
+ # add to only chain, instrumentation, prepend
59
+ # move the method content to a partial
60
+ end
61
+
62
+ private
63
+
64
+ def create_tests(name)
65
+ @name = name
66
+ @instrumentation_method_global_erb_snippet = '<%= $instrumentation_method %>'
67
+ base_path = "#{MULTIVERSE_SUITE_ROOT}#{@name.downcase}"
68
+ empty_directory(base_path)
69
+ template('templates/Envfile.tt', "#{base_path}/Envfile")
70
+ template('templates/test.tt', "#{base_path}/#{@name.downcase}_instrumentation_test.rb")
71
+
72
+ empty_directory("#{base_path}/config")
73
+ template('templates/newrelic.yml.tt', "#{base_path}/config/newrelic.yml")
74
+ end
75
+
76
+ def create_configuration(name)
77
+ config = <<-CONFIG
78
+ :'instrumentation.#{name.downcase}' => {
79
+ :default => 'auto',
80
+ :public => true,
81
+ :type => String,
82
+ :dynamic_name => true,
83
+ :allowed_from_server => false,
84
+ :description => 'Controls auto-instrumentation of the #{name.downcase} library at start up. May be one of [auto|prepend|chain|disabled].'
85
+ },
86
+ CONFIG
87
+ insert_into_file(
88
+ DEFAULT_SOURCE_LOCATION,
89
+ config,
90
+ after: ":description => 'Controls auto-instrumentation of bunny at start up. May be one of [auto|prepend|chain|disabled].'
91
+ },\n"
92
+ )
93
+ end
94
+ end
95
+
96
+ Instrumentation.start(ARGV)
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ instrumentation_methods :chain, :prepend
7
+
8
+ gemfile <<-RB
9
+ gem '<%= @name.downcase %>'
10
+ RB
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ module NewRelic::Agent::Instrumentation
7
+ module <%= @class_name %>
8
+ def self.instrument!
9
+ ::<%= @class_name %>.class_eval do
10
+ include NewRelic::Agent::Instrumentation::<%= @class_name %>
11
+
12
+ alias_method(:<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>)
13
+
14
+ def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %>
15
+ <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %> do
16
+ <%= @method.downcase %>_without_new_relic<%= "(#{@args})" unless @args.empty? %>
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,7 @@
1
+ alias_method :<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>
2
+
3
+ def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %>
4
+ <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %> do
5
+ <%= @method.downcase %>_without_new_relic<%= "(#{@args})" unless @args.empty? %>
6
+ end
7
+ end
@@ -0,0 +1,30 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ require_relative '<%= @name.downcase %>/instrumentation'
7
+ require_relative '<%= @name.downcase %>/chain'
8
+ require_relative '<%= @name.downcase %>/prepend'
9
+
10
+ DependencyDetection.defer do
11
+ named :<%= @name.match?(/\-|\_/) ? "'#{@name.downcase}'" : @name.downcase %>
12
+
13
+ depends_on do
14
+ # The class that needs to be defined to prepend/chain onto. This can be used
15
+ # to determine whether the library is installed.
16
+ defined?(::<%= @class_name %>)
17
+ # Add any additional requirements to verify whether this instrumentation
18
+ # should be installed
19
+ end
20
+
21
+ executes do
22
+ ::NewRelic::Agent.logger.info('Installing <%= @name.downcase %> instrumentation')
23
+
24
+ if use_prepend?
25
+ prepend_instrument ::<%= @class_name %>, NewRelic::Agent::Instrumentation::<%= @class_name %>::Prepend
26
+ else
27
+ chain_instrument NewRelic::Agent::Instrumentation::<%= @class_name %>
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,13 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ module NewRelic::Agent::Instrumentation
7
+ module <%= @class_name %>
8
+
9
+ def <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %>
10
+ # add instrumentation content here
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ def <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %>
2
+ # add instrumentation content here
3
+ end
@@ -0,0 +1,19 @@
1
+ ---
2
+ development:
3
+ error_collector:
4
+ enabled: true
5
+ apdex_t: 0.5
6
+ monitor_mode: true
7
+ license_key: bootstrap_newrelic_admin_license_key_000
8
+ instrumentation:
9
+ <%= @name.downcase %>: <%= @instrumentation_method_global_erb_snippet %>
10
+ app_name: test
11
+ log_level: debug
12
+ host: 127.0.0.1
13
+ api_host: 127.0.0.1
14
+ transaction_trace:
15
+ record_sql: obfuscated
16
+ enabled: true
17
+ stack_trace_threshold: 0.5
18
+ transaction_threshold: 1.0
19
+ capture_params: false
@@ -0,0 +1,14 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ module NewRelic::Agent::Instrumentation
7
+ module <%= @class_name %>::Prepend
8
+ include NewRelic::Agent::Instrumentation::<%= @class_name %>
9
+
10
+ def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %>
11
+ <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %> { super }
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,3 @@
1
+ def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %>
2
+ <%= @method.downcase %>_with_tracing<%= "(#{@args})" unless @args.empty? %> { super }
3
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
+ # frozen_string_literal: true
5
+
6
+ class <%= @class_name %>InstrumentationTest < Minitest::Test
7
+ def setup
8
+ @stats_engine = NewRelic::Agent.instance.stats_engine
9
+ end
10
+
11
+ def teardown
12
+ NewRelic::Agent.instance.stats_engine.clear_stats
13
+ end
14
+
15
+ # Add tests Here
16
+ end
data/newrelic_rpm.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem or plugin, hosted on
22
22
  https://github.com/newrelic/newrelic-ruby-agent/
23
23
  EOS
24
24
  s.email = "support@newrelic.com"
25
- s.executables = ["mongrel_rpm", "newrelic_cmd", "newrelic", "nrdebug"]
25
+ s.executables = ["newrelic_cmd", "newrelic", "nrdebug"]
26
26
  s.extra_rdoc_files = [
27
27
  "CHANGELOG.md",
28
28
  "LICENSE",
@@ -47,23 +47,19 @@ https://github.com/newrelic/newrelic-ruby-agent/
47
47
  s.homepage = "https://github.com/newrelic/rpm"
48
48
  s.require_paths = ["lib"]
49
49
  s.summary = "New Relic Ruby Agent"
50
- s.add_development_dependency 'rake', '12.3.3'
51
- s.add_development_dependency 'rb-inotify', '0.9.10' # locked to support < Ruby 2.3 (and listen 3.0.8)
52
- s.add_development_dependency 'listen', '3.0.8' # locked to support < Ruby 2.3
53
- s.add_development_dependency 'minitest', '4.7.5'
54
- s.add_development_dependency 'minitest-stub-const', '0.6'
55
- s.add_development_dependency 'mocha', '~> 1.9.0'
56
- s.add_development_dependency 'yard'
57
- s.add_development_dependency 'pry-nav', '~> 0.3.0'
58
- s.add_development_dependency 'pry-stack_explorer', '~> 0.4.9'
59
- s.add_development_dependency 'guard', '~> 2.16.0'
60
- s.add_development_dependency 'guard-minitest', '~> 2.4.0'
61
50
  s.add_development_dependency 'bundler'
51
+ s.add_development_dependency 'feedjira', '3.2.1' unless ENV['CI'] || RUBY_VERSION < '2.5' # for Gabby
52
+ s.add_development_dependency 'httparty' unless ENV['CI'] # for perf tests and Gabby
53
+ s.add_development_dependency 'minitest', '5.3.3'
54
+ s.add_development_dependency 'minitest-stub-const', '0.6'
55
+ s.add_development_dependency 'mocha', '~> 1.14.0'
56
+ s.add_development_dependency 'pry' unless ENV['CI']
57
+ s.add_development_dependency 'rake', '12.3.3'
62
58
  s.add_development_dependency 'rubocop'
59
+ s.add_development_dependency 'rubocop-minitest'
63
60
  s.add_development_dependency 'rubocop-performance'
64
- if RUBY_VERSION >= '2.7.0'
65
- s.add_development_dependency 'simplecov'
66
- s.add_development_dependency 'simplecov_json_formatter'
67
- end
68
- s.add_development_dependency 'httparty'
61
+ s.add_development_dependency 'rubocop-rake' if RUBY_VERSION >= '2.4.0'
62
+ s.add_development_dependency 'simplecov' if RUBY_VERSION >= '2.7.0'
63
+ s.add_development_dependency 'thor'
64
+ s.add_development_dependency 'yard'
69
65
  end
data/test/agent_helper.rb CHANGED
@@ -14,20 +14,6 @@ rescue LoadError
14
14
  # NOP -- Net::HTTP::STATUS_CODES was introduced in Ruby 2.5
15
15
  end
16
16
 
17
- module MiniTest
18
- module Assertions
19
- # The failure message is backwards. This patch reverses the message
20
- # Note: passing +msg+ caused two failure messages to be shown on failure
21
- # and was more confusing than patching here.
22
- def assert_match(matcher, obj, msg = nil)
23
- msg = message(msg) { "Expected #{mu_pp(obj)} to match #{mu_pp(matcher)}" }
24
- assert_respond_to matcher, :"=~"
25
- matcher = Regexp.new(Regexp.escape(matcher)) if String === matcher
26
- assert matcher =~ obj, msg
27
- end
28
- end
29
- end
30
-
31
17
  class ArrayLogDevice
32
18
  def initialize(array = [])
33
19
  @array = array
@@ -125,7 +111,7 @@ end
125
111
 
126
112
  unless defined? assert_empty
127
113
  def assert_empty(collection, msg = nil)
128
- assert collection.empty?, msg
114
+ assert_empty collection, msg
129
115
  end
130
116
  end
131
117
 
@@ -430,9 +416,9 @@ end
430
416
  # may be supplied.
431
417
  def with_segment(*args, &blk)
432
418
  segment = nil
433
- txn = in_transaction(*args) do |txn|
434
- segment = txn.current_segment
435
- yield(segment, txn)
419
+ txn = in_transaction(*args) do |t|
420
+ segment = t.current_segment
421
+ yield(segment, t)
436
422
  end
437
423
  [segment, txn]
438
424
  end
@@ -916,7 +902,7 @@ def assert_event_attributes(event, test_name, expected_attributes, non_expected_
916
902
  event_attrs.each do |name, actual_value|
917
903
  msg << " #{name}: #{actual_value.inspect}\n"
918
904
  end
919
- assert(incorrect_attributes.empty?, msg)
905
+ assert_empty(incorrect_attributes, msg)
920
906
 
921
907
  non_expected_attributes.each do |name|
922
908
  refute event_attrs[name], "Found value '#{event_attrs[name]}' for attribute '#{name}', but expected nothing in #{test_name}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.10.0
4
+ version: 8.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -11,64 +11,36 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-08-17 00:00:00.000000000 Z
14
+ date: 2022-09-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rake
18
- requirement: !ruby/object:Gem::Requirement
19
- requirements:
20
- - - '='
21
- - !ruby/object:Gem::Version
22
- version: 12.3.3
23
- type: :development
24
- prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- requirements:
27
- - - '='
28
- - !ruby/object:Gem::Version
29
- version: 12.3.3
30
- - !ruby/object:Gem::Dependency
31
- name: rb-inotify
32
- requirement: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - '='
35
- - !ruby/object:Gem::Version
36
- version: 0.9.10
37
- type: :development
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - '='
42
- - !ruby/object:Gem::Version
43
- version: 0.9.10
44
- - !ruby/object:Gem::Dependency
45
- name: listen
17
+ name: bundler
46
18
  requirement: !ruby/object:Gem::Requirement
47
19
  requirements:
48
- - - '='
20
+ - - ">="
49
21
  - !ruby/object:Gem::Version
50
- version: 3.0.8
22
+ version: '0'
51
23
  type: :development
52
24
  prerelease: false
53
25
  version_requirements: !ruby/object:Gem::Requirement
54
26
  requirements:
55
- - - '='
27
+ - - ">="
56
28
  - !ruby/object:Gem::Version
57
- version: 3.0.8
29
+ version: '0'
58
30
  - !ruby/object:Gem::Dependency
59
31
  name: minitest
60
32
  requirement: !ruby/object:Gem::Requirement
61
33
  requirements:
62
34
  - - '='
63
35
  - !ruby/object:Gem::Version
64
- version: 4.7.5
36
+ version: 5.3.3
65
37
  type: :development
66
38
  prerelease: false
67
39
  version_requirements: !ruby/object:Gem::Requirement
68
40
  requirements:
69
41
  - - '='
70
42
  - !ruby/object:Gem::Version
71
- version: 4.7.5
43
+ version: 5.3.3
72
44
  - !ruby/object:Gem::Dependency
73
45
  name: minitest-stub-const
74
46
  requirement: !ruby/object:Gem::Requirement
@@ -89,86 +61,44 @@ dependencies:
89
61
  requirements:
90
62
  - - "~>"
91
63
  - !ruby/object:Gem::Version
92
- version: 1.9.0
64
+ version: 1.14.0
93
65
  type: :development
94
66
  prerelease: false
95
67
  version_requirements: !ruby/object:Gem::Requirement
96
68
  requirements:
97
69
  - - "~>"
98
70
  - !ruby/object:Gem::Version
99
- version: 1.9.0
71
+ version: 1.14.0
100
72
  - !ruby/object:Gem::Dependency
101
- name: yard
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- version: '0'
107
- type: :development
108
- prerelease: false
109
- version_requirements: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - ">="
112
- - !ruby/object:Gem::Version
113
- version: '0'
114
- - !ruby/object:Gem::Dependency
115
- name: pry-nav
116
- requirement: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: 0.3.0
121
- type: :development
122
- prerelease: false
123
- version_requirements: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: 0.3.0
128
- - !ruby/object:Gem::Dependency
129
- name: pry-stack_explorer
130
- requirement: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: 0.4.9
135
- type: :development
136
- prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: 0.4.9
142
- - !ruby/object:Gem::Dependency
143
- name: guard
73
+ name: rake
144
74
  requirement: !ruby/object:Gem::Requirement
145
75
  requirements:
146
- - - "~>"
76
+ - - '='
147
77
  - !ruby/object:Gem::Version
148
- version: 2.16.0
78
+ version: 12.3.3
149
79
  type: :development
150
80
  prerelease: false
151
81
  version_requirements: !ruby/object:Gem::Requirement
152
82
  requirements:
153
- - - "~>"
83
+ - - '='
154
84
  - !ruby/object:Gem::Version
155
- version: 2.16.0
85
+ version: 12.3.3
156
86
  - !ruby/object:Gem::Dependency
157
- name: guard-minitest
87
+ name: rubocop
158
88
  requirement: !ruby/object:Gem::Requirement
159
89
  requirements:
160
- - - "~>"
90
+ - - ">="
161
91
  - !ruby/object:Gem::Version
162
- version: 2.4.0
92
+ version: '0'
163
93
  type: :development
164
94
  prerelease: false
165
95
  version_requirements: !ruby/object:Gem::Requirement
166
96
  requirements:
167
- - - "~>"
97
+ - - ">="
168
98
  - !ruby/object:Gem::Version
169
- version: 2.4.0
99
+ version: '0'
170
100
  - !ruby/object:Gem::Dependency
171
- name: bundler
101
+ name: rubocop-minitest
172
102
  requirement: !ruby/object:Gem::Requirement
173
103
  requirements:
174
104
  - - ">="
@@ -182,7 +112,7 @@ dependencies:
182
112
  - !ruby/object:Gem::Version
183
113
  version: '0'
184
114
  - !ruby/object:Gem::Dependency
185
- name: rubocop
115
+ name: rubocop-performance
186
116
  requirement: !ruby/object:Gem::Requirement
187
117
  requirements:
188
118
  - - ">="
@@ -196,7 +126,7 @@ dependencies:
196
126
  - !ruby/object:Gem::Version
197
127
  version: '0'
198
128
  - !ruby/object:Gem::Dependency
199
- name: rubocop-performance
129
+ name: rubocop-rake
200
130
  requirement: !ruby/object:Gem::Requirement
201
131
  requirements:
202
132
  - - ">="
@@ -224,7 +154,7 @@ dependencies:
224
154
  - !ruby/object:Gem::Version
225
155
  version: '0'
226
156
  - !ruby/object:Gem::Dependency
227
- name: simplecov_json_formatter
157
+ name: thor
228
158
  requirement: !ruby/object:Gem::Requirement
229
159
  requirements:
230
160
  - - ">="
@@ -238,7 +168,7 @@ dependencies:
238
168
  - !ruby/object:Gem::Version
239
169
  version: '0'
240
170
  - !ruby/object:Gem::Dependency
241
- name: httparty
171
+ name: yard
242
172
  requirement: !ruby/object:Gem::Requirement
243
173
  requirements:
244
174
  - - ">="
@@ -260,7 +190,6 @@ description: |
260
190
  https://github.com/newrelic/newrelic-ruby-agent/
261
191
  email: support@newrelic.com
262
192
  executables:
263
- - mongrel_rpm
264
193
  - newrelic_cmd
265
194
  - newrelic
266
195
  - nrdebug
@@ -275,6 +204,7 @@ files:
275
204
  - ".gitignore"
276
205
  - ".project"
277
206
  - ".rubocop.yml"
207
+ - ".rubocop_todo.yml"
278
208
  - ".simplecov"
279
209
  - ".snyk"
280
210
  - ".yardopts"
@@ -289,7 +219,7 @@ files:
289
219
  - README.md
290
220
  - Rakefile
291
221
  - THIRD_PARTY_NOTICES.md
292
- - bin/mongrel_rpm
222
+ - Thorfile
293
223
  - bin/newrelic
294
224
  - bin/newrelic_cmd
295
225
  - bin/nrdebug
@@ -647,6 +577,19 @@ files:
647
577
  - lib/tasks/config.text.erb
648
578
  - lib/tasks/coverage_report.rake
649
579
  - lib/tasks/install.rake
580
+ - lib/tasks/instrumentation_generator/README.md
581
+ - lib/tasks/instrumentation_generator/TODO.md
582
+ - lib/tasks/instrumentation_generator/instrumentation.thor
583
+ - lib/tasks/instrumentation_generator/templates/Envfile.tt
584
+ - lib/tasks/instrumentation_generator/templates/chain.tt
585
+ - lib/tasks/instrumentation_generator/templates/chain_method.tt
586
+ - lib/tasks/instrumentation_generator/templates/dependency_detection.tt
587
+ - lib/tasks/instrumentation_generator/templates/instrumentation.tt
588
+ - lib/tasks/instrumentation_generator/templates/instrumentation_method.tt
589
+ - lib/tasks/instrumentation_generator/templates/newrelic.yml.tt
590
+ - lib/tasks/instrumentation_generator/templates/prepend.tt
591
+ - lib/tasks/instrumentation_generator/templates/prepend_method.tt
592
+ - lib/tasks/instrumentation_generator/templates/test.tt
650
593
  - lib/tasks/multiverse.rake
651
594
  - lib/tasks/multiverse.rb
652
595
  - lib/tasks/newrelic.rb
data/bin/mongrel_rpm DELETED
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
- require 'rubygems'
4
- require 'rack'
5
- require 'rack/handler/mongrel'
6
- require 'optparse'
7
-
8
- port = 3000
9
- options = {}
10
- appname = nil
11
- OptionParser.new do |opts|
12
- opts.banner = "Usage: #{File.basename($0)} [options] [app_name]"
13
- opts.on("-p", "--port=port", Integer, "default: #{port}") { |port| }
14
- opts.on("--[no-]logging", "turn off request logging") { |l| options[:logging] = l }
15
- opts.on("--license=license_key", "override license key") { |l| options[:license_key] = l }
16
- opts.on("--install", "install a newrelic.yml template") { |l| options[:install] = true }
17
- opts.separator("")
18
- opts.separator("app_name is the name of the application where the metrics will be stored")
19
- opts.separator("")
20
- # The rackup file references this var
21
- appname = opts.parse!(ARGV.clone).first
22
- end
23
-
24
- options[:app_name] = appname if appname
25
-
26
- ru_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "new_relic", "rack", "mongrel_rpm.ru"))
27
- rackup_code = File.read(ru_file)
28
- builder = Rack::Builder.new { eval(rackup_code, binding, ru_file) }
29
-
30
- options = {:Host => '127.0.0.1', :Port => port}
31
- Rack::Handler::Mongrel.run(builder.to_app, options) do |server|
32
- NewRelic::Agent.logger.info("Started Mongrel listening for '#{NewRelic::Control.instance.app_names.join(" and ")}' data at #{server.host}:#{server.port}")
33
- end