newrelic_rpm 9.6.0 → 9.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +45 -2
- data/CONTRIBUTING.md +0 -7
- data/bin/newrelic +2 -9
- data/bin/newrelic_rpm +15 -0
- data/init.rb +2 -2
- data/lib/new_relic/agent/agent.rb +1 -1
- data/lib/new_relic/agent/agent_helpers/shutdown.rb +1 -1
- data/lib/new_relic/agent/agent_helpers/special_startup.rb +1 -1
- data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +2 -2
- data/lib/new_relic/agent/agent_helpers/startup.rb +2 -2
- data/lib/new_relic/agent/attribute_filter.rb +3 -3
- data/lib/new_relic/agent/configuration/default_source.rb +14 -2
- data/lib/new_relic/agent/configuration/manager.rb +8 -7
- data/lib/new_relic/agent/custom_event_aggregator.rb +27 -1
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +1 -1
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +3 -3
- data/lib/new_relic/agent/event_loop.rb +1 -1
- data/lib/new_relic/agent/http_clients/abstract.rb +4 -0
- data/lib/new_relic/agent/http_clients/async_http_wrappers.rb +0 -3
- data/lib/new_relic/agent/http_clients/curb_wrappers.rb +1 -3
- data/lib/new_relic/agent/http_clients/ethon_wrappers.rb +0 -2
- data/lib/new_relic/agent/http_clients/excon_wrappers.rb +0 -3
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +1 -3
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +0 -3
- data/lib/new_relic/agent/http_clients/httpx_wrappers.rb +0 -2
- data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +1 -4
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +0 -3
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -1
- data/lib/new_relic/agent/instrumentation/async_http.rb +3 -1
- data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +1 -4
- data/lib/new_relic/agent/instrumentation/grpc_server.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra.rb +1 -1
- data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +1 -4
- data/lib/new_relic/agent/instrumentation/view_component/chain.rb +21 -0
- data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +39 -0
- data/lib/new_relic/agent/instrumentation/view_component/prepend.rb +13 -0
- data/lib/new_relic/agent/instrumentation/view_component.rb +26 -0
- data/lib/new_relic/agent/javascript_instrumentor.rb +0 -1
- data/lib/new_relic/agent/new_relic_service/encoders.rb +2 -2
- data/lib/new_relic/agent/new_relic_service.rb +8 -6
- data/lib/new_relic/agent/obfuscator.rb +0 -2
- data/lib/new_relic/agent/pipe_channel_manager.rb +2 -2
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +1 -2
- data/lib/new_relic/agent/sql_sampler.rb +0 -1
- data/lib/new_relic/agent/tracer.rb +4 -3
- data/lib/new_relic/agent/transaction/tracing.rb +11 -1
- data/lib/new_relic/agent/vm/{mri_vm.rb → c_ruby_vm.rb} +7 -15
- data/lib/new_relic/agent/vm.rb +2 -2
- data/lib/new_relic/agent/worker_loop.rb +1 -1
- data/lib/new_relic/agent.rb +5 -5
- data/lib/new_relic/base64.rb +25 -0
- data/lib/new_relic/cli/command.rb +6 -4
- data/lib/new_relic/constants.rb +2 -0
- data/lib/new_relic/control/frameworks/rails.rb +3 -3
- data/lib/new_relic/control/instrumentation.rb +1 -1
- data/lib/new_relic/local_environment.rb +22 -13
- data/lib/new_relic/supportability_helper.rb +1 -1
- data/lib/new_relic/version.rb +2 -2
- data/lib/tasks/config.rake +1 -1
- data/lib/tasks/helpers/config.html.erb +6 -6
- data/lib/tasks/helpers/newrelicyml.rb +1 -1
- data/lib/tasks/instrumentation_generator/instrumentation.thor +1 -1
- data/lib/tasks/instrumentation_generator/templates/chain.tt +0 -1
- data/lib/tasks/instrumentation_generator/templates/chain_method.tt +0 -1
- data/newrelic.yml +6 -2
- data/newrelic_rpm.gemspec +3 -5
- data/test/agent_helper.rb +14 -2
- metadata +12 -21
- data/bin/newrelic_cmd +0 -7
@@ -1,5 +1,4 @@
|
|
1
1
|
alias_method(:<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>)
|
2
|
-
alias_method(:<%= @method.downcase %>, :<%= @method.downcase %>_with_new_relic)
|
3
2
|
|
4
3
|
def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %>
|
5
4
|
<%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> do
|
data/newrelic.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# This file configures the New Relic
|
2
|
+
# This file configures the New Relic agent. New Relic monitors Ruby, Java,
|
3
3
|
# .NET, PHP, Python, Node, and Go applications with deep visibility and low
|
4
4
|
# overhead. For more information, visit www.newrelic.com.
|
5
5
|
|
@@ -341,7 +341,7 @@ common: &default_settings
|
|
341
341
|
# embedded service within another framework and the agent is detecting the Sinatra
|
342
342
|
# app and skipping the at_exit handler as a result. Sinatra classically runs the
|
343
343
|
# entire application in an at_exit block and would otherwise misbehave if the
|
344
|
-
#
|
344
|
+
# agent's at_exit handler was also installed in those circumstances. Note:
|
345
345
|
# send_data_on_exit should also be set to true in tandem with this setting.
|
346
346
|
# force_install_exit_handler: false
|
347
347
|
|
@@ -535,6 +535,10 @@ common: &default_settings
|
|
535
535
|
# prepend, chain, disabled.
|
536
536
|
# instrumentation.typhoeus: auto
|
537
537
|
|
538
|
+
# Controls auto-instrumentation of ViewComponent at startup. May be one of: auto,
|
539
|
+
# prepend, chain, disabled.
|
540
|
+
# instrumentation.view_component: auto
|
541
|
+
|
538
542
|
# A dictionary of label names and values that will be applied to the data sent
|
539
543
|
# from this agent. May also be expressed as a semicolon-delimited ; string of
|
540
544
|
# colon-separated : pairs. For example, Server:One;Data Center:Primary.
|
data/newrelic_rpm.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
https://github.com/newrelic/newrelic-ruby-agent/
|
22
22
|
EOS
|
23
23
|
s.email = 'support@newrelic.com'
|
24
|
-
# TODO: MAJOR VERSION - remove
|
25
|
-
s.executables = %w[
|
24
|
+
# TODO: MAJOR VERSION - remove newrelic, deprecated since version xxx.
|
25
|
+
s.executables = %w[newrelic_rpm newrelic nrdebug]
|
26
26
|
s.extra_rdoc_files = [
|
27
27
|
'CHANGELOG.md',
|
28
28
|
'LICENSE',
|
@@ -50,8 +50,6 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.require_paths = ['lib']
|
51
51
|
s.summary = 'New Relic Ruby Agent'
|
52
52
|
|
53
|
-
s.add_dependency 'base64'
|
54
|
-
|
55
53
|
s.add_development_dependency 'bundler'
|
56
54
|
s.add_development_dependency 'feedjira', '3.2.1' unless ENV['CI'] || RUBY_VERSION < '2.5' # for Gabby
|
57
55
|
s.add_development_dependency 'httparty' unless ENV['CI'] # for perf tests and Gabby
|
@@ -62,7 +60,7 @@ Gem::Specification.new do |s|
|
|
62
60
|
s.add_development_dependency 'rack'
|
63
61
|
s.add_development_dependency 'rake', '12.3.3'
|
64
62
|
|
65
|
-
s.add_development_dependency 'rubocop', '1.
|
63
|
+
s.add_development_dependency 'rubocop', '1.57.2' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
66
64
|
s.add_development_dependency 'rubocop-ast', '1.28.1' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
67
65
|
s.add_development_dependency 'rubocop-minitest', '0.27.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
68
66
|
s.add_development_dependency 'rubocop-performance', '1.16.0' unless ENV['CI'] && RUBY_VERSION < '3.0.0'
|
data/test/agent_helper.rb
CHANGED
@@ -845,7 +845,7 @@ ensure
|
|
845
845
|
end
|
846
846
|
|
847
847
|
def json_dump_and_encode(object)
|
848
|
-
Base64.encode64(JSON.dump(object))
|
848
|
+
NewRelic::Base64.encode64(JSON.dump(object))
|
849
849
|
end
|
850
850
|
|
851
851
|
def get_last_analytics_event
|
@@ -871,7 +871,7 @@ def load_cross_agent_test(name)
|
|
871
871
|
test_file_path = File.join(cross_agent_tests_dir, "#{name}.json")
|
872
872
|
data = File.read(test_file_path)
|
873
873
|
data.gsub!('callCount', 'call_count')
|
874
|
-
data = JSON.
|
874
|
+
data = JSON.parse(data)
|
875
875
|
data.each { |testcase| testcase['testname'].tr!(' ', '_') if String === testcase['testname'] }
|
876
876
|
data
|
877
877
|
end
|
@@ -1025,3 +1025,15 @@ def defer_testing_to_min_supported_rails(test_file, min_rails_version, supports_
|
|
1025
1025
|
puts "Skipping tests in #{File.basename(test_file)} because Rails >= #{min_rails_version} is unavailable" if ENV['VERBOSE_TEST_OUTPUT']
|
1026
1026
|
end
|
1027
1027
|
end
|
1028
|
+
|
1029
|
+
def first_call_for(subject)
|
1030
|
+
items = $collector.calls_for(subject)
|
1031
|
+
|
1032
|
+
if defined?(JRUBY_VERSION)
|
1033
|
+
refute_predicate items.size, :zero?, "Expected at least one call for '#{subject}'"
|
1034
|
+
else
|
1035
|
+
assert_equal 1, items.size, "Expected exactly one call for '#{subject}'"
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
items.first
|
1039
|
+
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: 9.
|
4
|
+
version: 9.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanna McClure
|
@@ -11,22 +11,8 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: base64
|
18
|
-
requirement: !ruby/object:Gem::Requirement
|
19
|
-
requirements:
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '0'
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
16
|
- !ruby/object:Gem::Dependency
|
31
17
|
name: bundler
|
32
18
|
requirement: !ruby/object:Gem::Requirement
|
@@ -117,14 +103,14 @@ dependencies:
|
|
117
103
|
requirements:
|
118
104
|
- - '='
|
119
105
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
106
|
+
version: 1.57.2
|
121
107
|
type: :development
|
122
108
|
prerelease: false
|
123
109
|
version_requirements: !ruby/object:Gem::Requirement
|
124
110
|
requirements:
|
125
111
|
- - '='
|
126
112
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
113
|
+
version: 1.57.2
|
128
114
|
- !ruby/object:Gem::Dependency
|
129
115
|
name: rubocop-ast
|
130
116
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,7 +218,7 @@ description: |
|
|
232
218
|
https://github.com/newrelic/newrelic-ruby-agent/
|
233
219
|
email: support@newrelic.com
|
234
220
|
executables:
|
235
|
-
-
|
221
|
+
- newrelic_rpm
|
236
222
|
- newrelic
|
237
223
|
- nrdebug
|
238
224
|
extensions: []
|
@@ -253,7 +239,7 @@ files:
|
|
253
239
|
- THIRD_PARTY_NOTICES.md
|
254
240
|
- Thorfile
|
255
241
|
- bin/newrelic
|
256
|
-
- bin/
|
242
|
+
- bin/newrelic_rpm
|
257
243
|
- bin/nrdebug
|
258
244
|
- init.rb
|
259
245
|
- install.rb
|
@@ -520,6 +506,10 @@ files:
|
|
520
506
|
- lib/new_relic/agent/instrumentation/typhoeus/chain.rb
|
521
507
|
- lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb
|
522
508
|
- lib/new_relic/agent/instrumentation/typhoeus/prepend.rb
|
509
|
+
- lib/new_relic/agent/instrumentation/view_component.rb
|
510
|
+
- lib/new_relic/agent/instrumentation/view_component/chain.rb
|
511
|
+
- lib/new_relic/agent/instrumentation/view_component/instrumentation.rb
|
512
|
+
- lib/new_relic/agent/instrumentation/view_component/prepend.rb
|
523
513
|
- lib/new_relic/agent/internal_agent_error.rb
|
524
514
|
- lib/new_relic/agent/javascript_instrumentor.rb
|
525
515
|
- lib/new_relic/agent/linking_metadata.rb
|
@@ -608,11 +598,12 @@ files:
|
|
608
598
|
- lib/new_relic/agent/utilization/vendor.rb
|
609
599
|
- lib/new_relic/agent/utilization_data.rb
|
610
600
|
- lib/new_relic/agent/vm.rb
|
601
|
+
- lib/new_relic/agent/vm/c_ruby_vm.rb
|
611
602
|
- lib/new_relic/agent/vm/jruby_vm.rb
|
612
603
|
- lib/new_relic/agent/vm/monotonic_gc_profiler.rb
|
613
|
-
- lib/new_relic/agent/vm/mri_vm.rb
|
614
604
|
- lib/new_relic/agent/vm/snapshot.rb
|
615
605
|
- lib/new_relic/agent/worker_loop.rb
|
606
|
+
- lib/new_relic/base64.rb
|
616
607
|
- lib/new_relic/cli/command.rb
|
617
608
|
- lib/new_relic/cli/commands/deployments.rb
|
618
609
|
- lib/new_relic/cli/commands/install.rb
|
data/bin/newrelic_cmd
DELETED