newrelic_rpm 8.15.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -28
- data/.rubocop_todo.yml +41 -3
- data/CHANGELOG.md +191 -38
- data/CONTRIBUTING.md +1 -1
- data/README.md +3 -1
- data/bin/nrdebug +16 -16
- data/lib/new_relic/agent/agent_helpers/connect.rb +1 -1
- data/lib/new_relic/agent/agent_helpers/special_startup.rb +1 -2
- data/lib/new_relic/agent/attribute_filter.rb +0 -2
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +3 -3
- data/lib/new_relic/agent/configuration/default_source.rb +139 -476
- data/lib/new_relic/agent/configuration/high_security_source.rb +0 -2
- data/lib/new_relic/agent/configuration/security_policy_source.rb +0 -16
- data/lib/new_relic/agent/database.rb +0 -14
- data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +1 -2
- data/lib/new_relic/agent/error_collector.rb +1 -1
- data/lib/new_relic/agent/error_filter.rb +3 -3
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +6 -19
- data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +39 -0
- data/lib/new_relic/agent/instrumentation/action_dispatch.rb +31 -0
- data/lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb +64 -0
- data/lib/new_relic/agent/instrumentation/action_mailbox.rb +30 -0
- data/lib/new_relic/agent/instrumentation/action_mailbox_subscriber.rb +33 -0
- data/lib/new_relic/agent/instrumentation/action_mailer.rb +30 -0
- data/lib/new_relic/agent/instrumentation/action_mailer_subscriber.rb +85 -0
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +7 -7
- data/lib/new_relic/agent/instrumentation/active_job.rb +15 -2
- data/lib/new_relic/agent/instrumentation/active_job_subscriber.rb +41 -0
- data/lib/new_relic/agent/instrumentation/active_storage.rb +4 -0
- data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +2 -30
- data/lib/new_relic/agent/instrumentation/active_support.rb +21 -6
- data/lib/new_relic/agent/instrumentation/active_support_subscriber.rb +41 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/custom_events.rb +12 -0
- data/lib/new_relic/agent/instrumentation/fiber/chain.rb +20 -0
- data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +24 -0
- data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +18 -0
- data/lib/new_relic/agent/instrumentation/fiber.rb +25 -0
- data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +2 -2
- data/lib/new_relic/agent/instrumentation/net_http.rb +1 -1
- data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +41 -0
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +4 -4
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +13 -1
- data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +1 -8
- data/lib/new_relic/agent/instrumentation/rake.rb +1 -1
- data/lib/new_relic/agent/instrumentation/redis.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sequel.rb +4 -5
- data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +3 -7
- data/lib/new_relic/agent/monitors/cross_app_monitor.rb +0 -1
- data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +0 -1
- data/lib/new_relic/agent/new_relic_service.rb +1 -1
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +0 -1
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +1 -1
- data/lib/new_relic/agent/tracer.rb +10 -1
- data/lib/new_relic/agent/transaction/abstract_segment.rb +2 -2
- data/lib/new_relic/agent/transaction/tracing.rb +2 -2
- data/lib/new_relic/agent/transaction.rb +17 -16
- data/lib/new_relic/agent.rb +1 -19
- data/lib/new_relic/cli/commands/install.rb +9 -9
- data/lib/new_relic/control/instance_methods.rb +1 -1
- data/lib/new_relic/local_environment.rb +0 -10
- data/lib/new_relic/supportability_helper.rb +0 -1
- data/lib/new_relic/version.rb +2 -2
- data/lib/newrelic_rpm.rb +1 -1
- data/lib/sequel/extensions/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +3 -3
- data/lib/sequel/plugins/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +3 -3
- data/lib/tasks/helpers/format.rb +1 -1
- data/lib/tasks/instrumentation_generator/instrumentation.thor +7 -10
- data/lib/tasks/instrumentation_generator/templates/Envfile.tt +1 -1
- data/newrelic.yml +15 -9
- data/newrelic_rpm.gemspec +17 -13
- data/test/agent_helper.rb +1 -1
- metadata +37 -14
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -83
- data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -33
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -215
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -36
- data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -41
data/lib/new_relic/agent.rb
CHANGED
@@ -371,7 +371,7 @@ module NewRelic
|
|
371
371
|
# jobs or other work. If you are doing this with a web dispatcher
|
372
372
|
# that forks worker processes then you will need to force the
|
373
373
|
# agent to reconnect, which it won't do by default. Passenger and
|
374
|
-
#
|
374
|
+
# Unicorn are already handled, nothing special needed for them.
|
375
375
|
#
|
376
376
|
# Options:
|
377
377
|
# * <tt>:force_reconnect => true</tt> to force the spawned process to
|
@@ -511,18 +511,6 @@ module NewRelic
|
|
511
511
|
end
|
512
512
|
end
|
513
513
|
|
514
|
-
# This method disables the recording of transaction traces in the given
|
515
|
-
# block. See also #disable_all_tracing
|
516
|
-
#
|
517
|
-
# @api public
|
518
|
-
#
|
519
|
-
def disable_transaction_tracing
|
520
|
-
Deprecator.deprecate(:disable_transaction_tracing,
|
521
|
-
'disable_all_tracing or ignore_transaction')
|
522
|
-
record_api_supportability_metric(:disable_transaction_tracing)
|
523
|
-
yield
|
524
|
-
end
|
525
|
-
|
526
514
|
# This method sets the state of sql recording in the transaction
|
527
515
|
# sampler feature. Within the given block, no sql will be recorded
|
528
516
|
#
|
@@ -554,12 +542,6 @@ module NewRelic
|
|
554
542
|
NewRelic::Agent::Tracer.state.is_execution_traced?
|
555
543
|
end
|
556
544
|
|
557
|
-
# helper method to check the thread local to determine whether sql
|
558
|
-
# is being recorded or not
|
559
|
-
def tl_is_sql_recorded?
|
560
|
-
NewRelic::Agent::Tracer.state.is_sql_recorded?
|
561
|
-
end
|
562
|
-
|
563
545
|
# @!group Adding custom attributes to traces
|
564
546
|
|
565
547
|
# Add attributes to the transaction trace, Insights Transaction event, and
|
@@ -45,20 +45,20 @@ class NewRelic::Cli::Install < NewRelic::Cli::Command
|
|
45
45
|
|
46
46
|
File.open(dest_file, 'w') { |out| out.puts(content) }
|
47
47
|
|
48
|
-
puts
|
48
|
+
puts <<~EOF unless quiet
|
49
49
|
|
50
|
-
Installed a default configuration file at
|
51
|
-
#{dest_file}.
|
50
|
+
Installed a default configuration file at
|
51
|
+
#{dest_file}.
|
52
52
|
EOF
|
53
|
-
puts
|
53
|
+
puts <<~EOF unless quiet || @license_key != NO_LICENSE_KEY
|
54
54
|
|
55
|
-
To monitor your application in production mode, sign up for an account
|
56
|
-
at www.newrelic.com, and replace the newrelic.yml file with the one
|
57
|
-
you receive upon registration.
|
55
|
+
To monitor your application in production mode, sign up for an account
|
56
|
+
at www.newrelic.com, and replace the newrelic.yml file with the one
|
57
|
+
you receive upon registration.
|
58
58
|
EOF
|
59
|
-
puts
|
59
|
+
puts <<~EOF unless quiet
|
60
60
|
|
61
|
-
Visit support.newrelic.com if you are experiencing installation issues.
|
61
|
+
Visit support.newrelic.com if you are experiencing installation issues.
|
62
62
|
EOF
|
63
63
|
end
|
64
64
|
|
@@ -65,7 +65,7 @@ module NewRelic
|
|
65
65
|
# An artifact of earlier implementation, we put both #add_method_tracer and #trace_execution
|
66
66
|
# methods in the module methods.
|
67
67
|
# Rails applications load the next two lines before any other initializers are run
|
68
|
-
unless defined?(Rails::VERSION) &&
|
68
|
+
unless defined?(Rails::VERSION) && ENV['NEW_RELIC_DEFER_RAILS_INITIALIZATION']
|
69
69
|
Module.send(:include, NewRelic::Agent::MethodTracer::ClassMethods)
|
70
70
|
Module.send(:include, NewRelic::Agent::MethodTracer)
|
71
71
|
end
|
@@ -74,9 +74,7 @@ module NewRelic
|
|
74
74
|
unicorn
|
75
75
|
webrick
|
76
76
|
fastcgi
|
77
|
-
rainbows
|
78
77
|
]
|
79
|
-
# TODO: MAJOR VERSION - remove rainbows
|
80
78
|
while dispatchers.any? && @discovered_dispatcher.nil?
|
81
79
|
send('check_for_' + (dispatchers.shift))
|
82
80
|
end
|
@@ -134,14 +132,6 @@ module NewRelic
|
|
134
132
|
end
|
135
133
|
end
|
136
134
|
|
137
|
-
# TODO: MAJOR VERSION - remove this method
|
138
|
-
def check_for_rainbows
|
139
|
-
if (defined?(::Rainbows) && defined?(::Rainbows::HttpServer)) && NewRelic::LanguageSupport.object_space_usable?
|
140
|
-
v = find_class_in_object_space(::Rainbows::HttpServer)
|
141
|
-
@discovered_dispatcher = :rainbows if v
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
135
|
def check_for_puma
|
146
136
|
if defined?(::Puma) && File.basename($0) == 'puma'
|
147
137
|
@discovered_dispatcher = :puma
|
data/lib/new_relic/version.rb
CHANGED
data/lib/newrelic_rpm.rb
CHANGED
@@ -20,7 +20,7 @@ require 'new_relic/control'
|
|
20
20
|
if defined?(Rails::VERSION)
|
21
21
|
module NewRelic
|
22
22
|
class Railtie < Rails::Railtie
|
23
|
-
if
|
23
|
+
if ENV['NEW_RELIC_DEFER_RAILS_INITIALIZATION']
|
24
24
|
initializer "newrelic_rpm.include_method_tracers", before: :load_config_initializers do |app|
|
25
25
|
Module.send(:include, NewRelic::Agent::MethodTracer::ClassMethods)
|
26
26
|
Module.send(:include, NewRelic::Agent::MethodTracer)
|
@@ -17,7 +17,7 @@ module Sequel
|
|
17
17
|
# instrumentation is loaded:
|
18
18
|
#
|
19
19
|
# db = Sequel.connect( ... )
|
20
|
-
# db.extension :
|
20
|
+
# db.extension :new_relic_instrumentation
|
21
21
|
#
|
22
22
|
# Versions 3.47.0 and later use `Database.extension` to automatically
|
23
23
|
# install the extension for new connections.
|
@@ -93,6 +93,6 @@ module Sequel
|
|
93
93
|
end
|
94
94
|
end # module NewRelicInstrumentation
|
95
95
|
|
96
|
-
NewRelic::Agent.logger.debug("Registering the :
|
97
|
-
Database.register_extension(:
|
96
|
+
NewRelic::Agent.logger.debug("Registering the :new_relic_instrumentation extension.")
|
97
|
+
Database.register_extension(:new_relic_instrumentation, NewRelicInstrumentation)
|
98
98
|
end # module Sequel
|
@@ -11,7 +11,7 @@ require 'new_relic/agent/datastores/metric_helper'
|
|
11
11
|
module Sequel
|
12
12
|
module Plugins
|
13
13
|
# Sequel::Model instrumentation for the New Relic agent.
|
14
|
-
module
|
14
|
+
module NewRelicInstrumentation
|
15
15
|
# Meta-programming for creating method tracers for the Sequel::Model plugin.
|
16
16
|
module MethodWrapping
|
17
17
|
# Install a method named +method_name+ that will trace execution
|
@@ -38,7 +38,7 @@ module Sequel
|
|
38
38
|
|
39
39
|
# Methods to be added to Sequel::Model instances.
|
40
40
|
module InstanceMethods
|
41
|
-
extend Sequel::Plugins::
|
41
|
+
extend Sequel::Plugins::NewRelicInstrumentation::MethodWrapping
|
42
42
|
|
43
43
|
wrap_sequel_method :delete
|
44
44
|
wrap_sequel_method :destroy
|
@@ -52,7 +52,7 @@ module Sequel
|
|
52
52
|
|
53
53
|
# Methods to be added to Sequel::Model classes.
|
54
54
|
module ClassMethods
|
55
|
-
extend Sequel::Plugins::
|
55
|
+
extend Sequel::Plugins::NewRelicInstrumentation::MethodWrapping
|
56
56
|
|
57
57
|
wrap_sequel_method :[], "get"
|
58
58
|
wrap_sequel_method :all
|
data/lib/tasks/helpers/format.rb
CHANGED
@@ -43,7 +43,7 @@ module Format
|
|
43
43
|
def flatten_config_hash(config_hash)
|
44
44
|
sections = []
|
45
45
|
config = [GENERAL, 'transaction_tracer', 'error_collector',
|
46
|
-
'browser_monitoring', '
|
46
|
+
'browser_monitoring', 'transaction_events',
|
47
47
|
'application_logging']
|
48
48
|
|
49
49
|
config.each { |config| sections << pluck(config, config_hash) }
|
@@ -14,7 +14,7 @@ class Instrumentation < Thor
|
|
14
14
|
NEWRELIC_YML_LOCATION = 'newrelic.yml'
|
15
15
|
|
16
16
|
desc('scaffold NAME', 'Scaffold the required files for adding new instrumentation')
|
17
|
-
long_desc
|
17
|
+
long_desc <<~LONGDESC
|
18
18
|
`instrumentation scaffold` requires one parameter by default: the name of the
|
19
19
|
library or class you are instrumenting. This task generates the basic
|
20
20
|
file structure needed to add new instrumentation to the Ruby agent.
|
@@ -96,7 +96,7 @@ class Instrumentation < Thor
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def config_block(name)
|
99
|
-
|
99
|
+
<<~CONFIG
|
100
100
|
:'instrumentation.#{name.downcase}' => {
|
101
101
|
:default => 'auto',
|
102
102
|
:public => true,
|
@@ -108,16 +108,13 @@ class Instrumentation < Thor
|
|
108
108
|
CONFIG
|
109
109
|
end
|
110
110
|
|
111
|
-
# TODO: OLD RUBIES - RUBY_VERSION 2.2
|
112
|
-
# When we only support 2.3+ this can be changed to a sqiggle heredoc (<<~)
|
113
|
-
# and use standard indentation
|
114
111
|
def yaml_block(name)
|
115
|
-
|
112
|
+
<<~HEREDOC
|
116
113
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
HEREDOC
|
114
|
+
# Controls auto-instrumentation of #{name} at start up.
|
115
|
+
# May be one of [auto|prepend|chain|disabled]
|
116
|
+
# instrumentation.#{name.downcase}: auto
|
117
|
+
HEREDOC
|
121
118
|
end
|
122
119
|
end
|
123
120
|
|
data/newrelic.yml
CHANGED
@@ -162,19 +162,24 @@ common: &default_settings
|
|
162
162
|
# or port_path_or_id parameters to transaction or slow SQL traces.
|
163
163
|
# datastore_tracer.instance_reporting.enabled: true
|
164
164
|
|
165
|
-
# If true, when the agent is in an application using Ruby on Rails, it will start after
|
166
|
-
# config/initializers have run.
|
167
|
-
# defer_rails_initialization: false
|
168
|
-
|
169
165
|
# If true, disables Action Cable instrumentation.
|
170
166
|
# disable_action_cable_instrumentation: false
|
171
167
|
|
172
|
-
# If true, disables
|
168
|
+
# If true, disables Action Mailbox instrumentation.
|
169
|
+
# disable_action_mailbox: false
|
170
|
+
|
171
|
+
# If true, disables Action Mailer instrumentation.
|
172
|
+
# disable_action_mailer: false
|
173
|
+
|
174
|
+
# If true, disables instrumentation for Active Record 4+
|
173
175
|
# disable_active_record_notifications: false
|
174
176
|
|
175
177
|
# If true, disables Active Storage instrumentation.
|
176
178
|
# disable_active_storage: false
|
177
179
|
|
180
|
+
# If true, disables Active Support instrumentation.
|
181
|
+
# disable_active_support: false
|
182
|
+
|
178
183
|
# If true, disables Active Job instrumentation.
|
179
184
|
# disable_activejob: false
|
180
185
|
|
@@ -187,9 +192,6 @@ common: &default_settings
|
|
187
192
|
# If true, disables ActiveSupport custom events instrumentation.
|
188
193
|
# disable_custom_events_instrumentation: false
|
189
194
|
|
190
|
-
# If true, disables DataMapper instrumentation.
|
191
|
-
# disable_data_mapper: false
|
192
|
-
|
193
195
|
# If true, the agent won't measure the depth of Delayed Job queues.
|
194
196
|
# disable_delayed_job_sampler: false
|
195
197
|
|
@@ -328,6 +330,10 @@ common: &default_settings
|
|
328
330
|
# May be one of [auto|prepend|chain|disabled].
|
329
331
|
# instrumentation.bunny: auto
|
330
332
|
|
333
|
+
# Controls auto-instrumentation of Fiber at start up.
|
334
|
+
# May be one of [auto|prepend|chain|disabled]
|
335
|
+
# instrumentation.fiber: auto
|
336
|
+
|
331
337
|
# Controls auto-instrumentation of concurrent_ruby at start up.
|
332
338
|
# May be one of [auto|prepend|chain|disabled]
|
333
339
|
# instrumentation.concurrent_ruby: auto
|
@@ -435,7 +441,7 @@ common: &default_settings
|
|
435
441
|
# instrumentation.thread: auto
|
436
442
|
|
437
443
|
# Controls auto-instrumentation of the Thread class at start up to automatically add tracing to all Threads created in the application.
|
438
|
-
# instrumentation.thread.tracing:
|
444
|
+
# instrumentation.thread.tracing: true
|
439
445
|
|
440
446
|
# Controls auto-instrumentation of gRPC clients at start up.
|
441
447
|
# May be one of [auto|prepend|chain|disabled].
|
data/newrelic_rpm.gemspec
CHANGED
@@ -8,17 +8,17 @@ require 'new_relic/latest_changes'
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "newrelic_rpm"
|
10
10
|
s.version = NewRelic::VERSION::STRING
|
11
|
-
s.required_ruby_version = '>= 2.
|
11
|
+
s.required_ruby_version = '>= 2.4.0'
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to?(:required_rubygems_version=)
|
13
13
|
s.authors = ["Tanna McClure", "Kayla Reopelle", "James Bunch", "Hannah Ramadan"]
|
14
14
|
s.licenses = ['Apache-2.0']
|
15
|
-
s.description =
|
16
|
-
New Relic is a performance management system, developed by New Relic,
|
17
|
-
Inc (http://www.newrelic.com). New Relic provides you with deep
|
18
|
-
information about the performance of your web application as it runs
|
19
|
-
in production. The New Relic Ruby agent is dual-purposed as a either a
|
20
|
-
Gem or plugin, hosted on
|
21
|
-
https://github.com/newrelic/newrelic-ruby-agent/
|
15
|
+
s.description = <<~EOS
|
16
|
+
New Relic is a performance management system, developed by New Relic,
|
17
|
+
Inc (http://www.newrelic.com). New Relic provides you with deep
|
18
|
+
information about the performance of your web application as it runs
|
19
|
+
in production. The New Relic Ruby agent is dual-purposed as a either a
|
20
|
+
Gem or plugin, hosted on
|
21
|
+
https://github.com/newrelic/newrelic-ruby-agent/
|
22
22
|
EOS
|
23
23
|
s.email = "support@newrelic.com"
|
24
24
|
s.executables = %w[newrelic_cmd newrelic nrdebug]
|
@@ -54,11 +54,15 @@ https://github.com/newrelic/newrelic-ruby-agent/
|
|
54
54
|
s.add_development_dependency 'mocha', '~> 1.16'
|
55
55
|
s.add_development_dependency 'pry' unless ENV['CI']
|
56
56
|
s.add_development_dependency 'rake', '12.3.3'
|
57
|
-
|
58
|
-
s.add_development_dependency 'rubocop
|
59
|
-
s.add_development_dependency 'rubocop-
|
60
|
-
s.add_development_dependency 'rubocop-
|
57
|
+
|
58
|
+
s.add_development_dependency 'rubocop', '1.44.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
59
|
+
s.add_development_dependency 'rubocop-ast', '1.24.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
60
|
+
s.add_development_dependency 'rubocop-minitest', '0.27.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
61
|
+
s.add_development_dependency 'rubocop-performance', '1.16.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
62
|
+
s.add_development_dependency 'rubocop-rake', '0.6.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
63
|
+
|
61
64
|
s.add_development_dependency 'simplecov' if RUBY_VERSION >= '2.7.0'
|
62
65
|
s.add_development_dependency 'thor' unless ENV['CI']
|
63
|
-
s.add_development_dependency '
|
66
|
+
s.add_development_dependency 'warning' if RUBY_VERSION >= '2.4.0'
|
67
|
+
s.add_development_dependency 'yard'
|
64
68
|
end
|
data/test/agent_helper.rb
CHANGED
@@ -1021,6 +1021,6 @@ def defer_testing_to_min_supported_rails(test_file, min_rails_version, supports_
|
|
1021
1021
|
|
1022
1022
|
yield
|
1023
1023
|
else
|
1024
|
-
puts "Skipping tests in #{test_file} because Rails >= #{min_rails_version} is unavailable"
|
1024
|
+
puts "Skipping tests in #{File.basename(test_file)} because Rails >= #{min_rails_version} is unavailable" if ENV["VERBOSE_TEST_OUTPUT"]
|
1025
1025
|
end
|
1026
1026
|
end
|
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:
|
4
|
+
version: 9.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanna McClure
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2023-
|
14
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -97,20 +97,34 @@ dependencies:
|
|
97
97
|
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: warning
|
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'
|
100
114
|
- !ruby/object:Gem::Dependency
|
101
115
|
name: yard
|
102
116
|
requirement: !ruby/object:Gem::Requirement
|
103
117
|
requirements:
|
104
|
-
- - "
|
118
|
+
- - ">="
|
105
119
|
- !ruby/object:Gem::Version
|
106
|
-
version: 0
|
120
|
+
version: '0'
|
107
121
|
type: :development
|
108
122
|
prerelease: false
|
109
123
|
version_requirements: !ruby/object:Gem::Requirement
|
110
124
|
requirements:
|
111
|
-
- - "
|
125
|
+
- - ">="
|
112
126
|
- !ruby/object:Gem::Version
|
113
|
-
version: 0
|
127
|
+
version: '0'
|
114
128
|
description: |
|
115
129
|
New Relic is a performance management system, developed by New Relic,
|
116
130
|
Inc (http://www.newrelic.com). New Relic provides you with deep
|
@@ -241,9 +255,17 @@ files:
|
|
241
255
|
- lib/new_relic/agent/http_clients/uri_util.rb
|
242
256
|
- lib/new_relic/agent/instrumentation.rb
|
243
257
|
- lib/new_relic/agent/instrumentation/action_cable_subscriber.rb
|
258
|
+
- lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb
|
244
259
|
- lib/new_relic/agent/instrumentation/action_controller_subscriber.rb
|
260
|
+
- lib/new_relic/agent/instrumentation/action_dispatch.rb
|
261
|
+
- lib/new_relic/agent/instrumentation/action_dispatch_subscriber.rb
|
262
|
+
- lib/new_relic/agent/instrumentation/action_mailbox.rb
|
263
|
+
- lib/new_relic/agent/instrumentation/action_mailbox_subscriber.rb
|
264
|
+
- lib/new_relic/agent/instrumentation/action_mailer.rb
|
265
|
+
- lib/new_relic/agent/instrumentation/action_mailer_subscriber.rb
|
245
266
|
- lib/new_relic/agent/instrumentation/action_view_subscriber.rb
|
246
267
|
- lib/new_relic/agent/instrumentation/active_job.rb
|
268
|
+
- lib/new_relic/agent/instrumentation/active_job_subscriber.rb
|
247
269
|
- lib/new_relic/agent/instrumentation/active_merchant.rb
|
248
270
|
- lib/new_relic/agent/instrumentation/active_record.rb
|
249
271
|
- lib/new_relic/agent/instrumentation/active_record_helper.rb
|
@@ -257,8 +279,7 @@ files:
|
|
257
279
|
- lib/new_relic/agent/instrumentation/active_support_logger/chain.rb
|
258
280
|
- lib/new_relic/agent/instrumentation/active_support_logger/instrumentation.rb
|
259
281
|
- lib/new_relic/agent/instrumentation/active_support_logger/prepend.rb
|
260
|
-
- lib/new_relic/agent/instrumentation/
|
261
|
-
- lib/new_relic/agent/instrumentation/authlogic.rb
|
282
|
+
- lib/new_relic/agent/instrumentation/active_support_subscriber.rb
|
262
283
|
- lib/new_relic/agent/instrumentation/bunny.rb
|
263
284
|
- lib/new_relic/agent/instrumentation/bunny/chain.rb
|
264
285
|
- lib/new_relic/agent/instrumentation/bunny/instrumentation.rb
|
@@ -272,8 +293,8 @@ files:
|
|
272
293
|
- lib/new_relic/agent/instrumentation/curb/chain.rb
|
273
294
|
- lib/new_relic/agent/instrumentation/curb/instrumentation.rb
|
274
295
|
- lib/new_relic/agent/instrumentation/curb/prepend.rb
|
296
|
+
- lib/new_relic/agent/instrumentation/custom_events.rb
|
275
297
|
- lib/new_relic/agent/instrumentation/custom_events_subscriber.rb
|
276
|
-
- lib/new_relic/agent/instrumentation/data_mapper.rb
|
277
298
|
- lib/new_relic/agent/instrumentation/delayed_job/chain.rb
|
278
299
|
- lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb
|
279
300
|
- lib/new_relic/agent/instrumentation/delayed_job/prepend.rb
|
@@ -284,6 +305,10 @@ files:
|
|
284
305
|
- lib/new_relic/agent/instrumentation/elasticsearch/prepend.rb
|
285
306
|
- lib/new_relic/agent/instrumentation/excon.rb
|
286
307
|
- lib/new_relic/agent/instrumentation/excon/middleware.rb
|
308
|
+
- lib/new_relic/agent/instrumentation/fiber.rb
|
309
|
+
- lib/new_relic/agent/instrumentation/fiber/chain.rb
|
310
|
+
- lib/new_relic/agent/instrumentation/fiber/instrumentation.rb
|
311
|
+
- lib/new_relic/agent/instrumentation/fiber/prepend.rb
|
287
312
|
- lib/new_relic/agent/instrumentation/grape.rb
|
288
313
|
- lib/new_relic/agent/instrumentation/grape/chain.rb
|
289
314
|
- lib/new_relic/agent/instrumentation/grape/instrumentation.rb
|
@@ -344,7 +369,6 @@ files:
|
|
344
369
|
- lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb
|
345
370
|
- lib/new_relic/agent/instrumentation/rails_notifications/action_view.rb
|
346
371
|
- lib/new_relic/agent/instrumentation/rails_notifications/custom_events.rb
|
347
|
-
- lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb
|
348
372
|
- lib/new_relic/agent/instrumentation/rake.rb
|
349
373
|
- lib/new_relic/agent/instrumentation/rake/chain.rb
|
350
374
|
- lib/new_relic/agent/instrumentation/rake/instrumentation.rb
|
@@ -372,7 +396,6 @@ files:
|
|
372
396
|
- lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb
|
373
397
|
- lib/new_relic/agent/instrumentation/sinatra/prepend.rb
|
374
398
|
- lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb
|
375
|
-
- lib/new_relic/agent/instrumentation/sunspot.rb
|
376
399
|
- lib/new_relic/agent/instrumentation/thread.rb
|
377
400
|
- lib/new_relic/agent/instrumentation/thread/chain.rb
|
378
401
|
- lib/new_relic/agent/instrumentation/thread/instrumentation.rb
|
@@ -520,8 +543,8 @@ files:
|
|
520
543
|
- lib/new_relic/traced_thread.rb
|
521
544
|
- lib/new_relic/version.rb
|
522
545
|
- lib/newrelic_rpm.rb
|
523
|
-
- lib/sequel/extensions/
|
524
|
-
- lib/sequel/plugins/
|
546
|
+
- lib/sequel/extensions/new_relic_instrumentation.rb
|
547
|
+
- lib/sequel/plugins/new_relic_instrumentation.rb
|
525
548
|
- lib/tasks/all.rb
|
526
549
|
- lib/tasks/config.rake
|
527
550
|
- lib/tasks/coverage_report.rake
|
@@ -570,7 +593,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
570
593
|
requirements:
|
571
594
|
- - ">="
|
572
595
|
- !ruby/object:Gem::Version
|
573
|
-
version: 2.
|
596
|
+
version: 2.4.0
|
574
597
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
575
598
|
requirements:
|
576
599
|
- - ">"
|
@@ -1,83 +0,0 @@
|
|
1
|
-
# This file is distributed under New Relic's license terms.
|
2
|
-
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
|
3
|
-
# frozen_string_literal: true
|
4
|
-
|
5
|
-
require 'new_relic/agent/database'
|
6
|
-
|
7
|
-
module NewRelic
|
8
|
-
module Instrumentation
|
9
|
-
module ActsAsSolrInstrumentation
|
10
|
-
module ParserMethodsInstrumentation
|
11
|
-
def parse_query_with_newrelic(*args)
|
12
|
-
self.class.trace_execution_scoped(["SolrClient/ActsAsSolr/query"]) do
|
13
|
-
begin
|
14
|
-
parse_query_without_newrelic(*args)
|
15
|
-
ensure
|
16
|
-
return unless txn = ::NewRelic::Agent::Tracer.current_transaction
|
17
|
-
|
18
|
-
txn.current_segment.params[:statement] = ::NewRelic::Agent::Database.truncate_query(args.first.inspect) rescue nil
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
DependencyDetection.defer do
|
28
|
-
@name = :acts_as_solr
|
29
|
-
|
30
|
-
depends_on do
|
31
|
-
defined?(ActsAsSolr)
|
32
|
-
end
|
33
|
-
|
34
|
-
depends_on do
|
35
|
-
defined?(ActsAsSolr::ParserMethods)
|
36
|
-
end
|
37
|
-
|
38
|
-
depends_on do
|
39
|
-
defined?(ActsAsSolr::ClassMethods)
|
40
|
-
end
|
41
|
-
|
42
|
-
depends_on do
|
43
|
-
defined?(ActsAsSolr::CommonMethods)
|
44
|
-
end
|
45
|
-
|
46
|
-
executes do
|
47
|
-
NewRelic::Agent.logger.info('Installing ActsAsSolr instrumentation')
|
48
|
-
deprecation_msg = 'The instrumentation for ActsAsSolr is deprecated. ' \
|
49
|
-
'It will be removed in version 9.0.0.' \
|
50
|
-
|
51
|
-
NewRelic::Agent.logger.log_once(
|
52
|
-
:warn,
|
53
|
-
:deprecated_acts_as_solr,
|
54
|
-
deprecation_msg
|
55
|
-
)
|
56
|
-
end
|
57
|
-
|
58
|
-
executes do
|
59
|
-
ActsAsSolr::ParserMethods.module_eval do
|
60
|
-
include NewRelic::Instrumentation::ActsAsSolrInstrumentation::ParserMethodsInstrumentation
|
61
|
-
alias :parse_query_without_newrelic :parse_query
|
62
|
-
alias :parse_query :parse_query_with_newrelic
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
executes do
|
67
|
-
ActsAsSolr::ClassMethods.module_eval do
|
68
|
-
%w[find_by_solr find_id_by_solr multi_solr_search count_by_solr].each do |method|
|
69
|
-
add_method_tracer method, 'SolrClient/ActsAsSolr/query'
|
70
|
-
end
|
71
|
-
add_method_tracer :rebuild_solr_index, 'SolrClient/ActsAsSolr/index'
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
executes do
|
76
|
-
ActsAsSolr::CommonMethods.module_eval do
|
77
|
-
add_method_tracer :solr_add, 'SolrClient/ActsAsSolr/add'
|
78
|
-
add_method_tracer :solr_delete, 'SolrClient/ActsAsSolr/delete'
|
79
|
-
add_method_tracer :solr_commit, 'SolrClient/ActsAsSolr/commit'
|
80
|
-
add_method_tracer :solr_optimize, 'SolrClient/ActsAsSolr/optimize'
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# This file is distributed under New Relic's license terms.
|
2
|
-
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
|
3
|
-
# frozen_string_literal: true
|
4
|
-
|
5
|
-
DependencyDetection.defer do
|
6
|
-
@name = :authlogic
|
7
|
-
|
8
|
-
depends_on do
|
9
|
-
defined?(Authlogic) &&
|
10
|
-
defined?(Authlogic::Session) &&
|
11
|
-
defined?(Authlogic::Session::Base)
|
12
|
-
end
|
13
|
-
|
14
|
-
executes do
|
15
|
-
NewRelic::Agent.logger.info('Installing Authlogic instrumentation')
|
16
|
-
deprecation_msg = 'The instrumentation for Authlogic is deprecated. ' \
|
17
|
-
'It will be removed in version 9.0.0.' \
|
18
|
-
|
19
|
-
NewRelic::Agent.logger.log_once(
|
20
|
-
:warn,
|
21
|
-
:deprecated_authlogic,
|
22
|
-
deprecation_msg
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
executes do
|
27
|
-
Authlogic::Session::Base.class_eval do
|
28
|
-
class << self
|
29
|
-
add_method_tracer :find, 'Custom/Authlogic/find'
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|