newrelic_rpm 9.16.0 → 9.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.build_ignore +0 -1
- data/CHANGELOG.md +51 -3
- data/CONTRIBUTING.md +2 -2
- data/lib/boot/strap.rb +4 -3
- data/lib/new_relic/agent/agent.rb +4 -0
- data/lib/new_relic/agent/agent_helpers/connect.rb +3 -0
- data/lib/new_relic/agent/agent_helpers/harvest.rb +3 -0
- data/lib/new_relic/agent/agent_helpers/shutdown.rb +3 -0
- data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +1 -0
- data/lib/new_relic/agent/agent_helpers/startup.rb +7 -0
- data/lib/new_relic/agent/aws.rb +54 -3
- data/lib/new_relic/agent/configuration/default_source.rb +52 -11
- data/lib/new_relic/agent/configuration/yaml_source.rb +6 -1
- data/lib/new_relic/agent/database.rb +5 -1
- data/lib/new_relic/agent/distributed_tracing.rb +2 -2
- data/lib/new_relic/agent/health_check.rb +136 -0
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +5 -1
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +8 -4
- data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb +21 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb +66 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb +15 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb +22 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb +21 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb +91 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb +15 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb +22 -0
- data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb +8 -9
- data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +7 -1
- data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +0 -3
- data/lib/new_relic/agent/instrumentation/resque.rb +7 -1
- data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +1 -1
- data/lib/new_relic/agent/local_log_decorator.rb +12 -2
- data/lib/new_relic/agent/new_relic_service.rb +8 -2
- data/lib/new_relic/agent/threading/backtrace_node.rb +10 -1
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +3 -0
- data/lib/new_relic/agent.rb +2 -2
- data/lib/new_relic/dependency_detection.rb +1 -8
- data/lib/new_relic/version.rb +1 -1
- data/newrelic.yml +32 -26
- data/test/agent_helper.rb +7 -0
- metadata +12 -6
@@ -144,8 +144,6 @@ module DependencyDetection
|
|
144
144
|
!(disabled_configured? || deprecated_disabled_configured?)
|
145
145
|
end
|
146
146
|
|
147
|
-
# TODO: MAJOR VERSION
|
148
|
-
# will only return true if a disabled key is found and is truthy
|
149
147
|
def deprecated_disabled_configured?
|
150
148
|
return false if self.name.nil?
|
151
149
|
|
@@ -153,12 +151,7 @@ module DependencyDetection
|
|
153
151
|
return false unless ::NewRelic::Agent.config[key] == true
|
154
152
|
|
155
153
|
::NewRelic::Agent.logger.debug("Not installing #{self.name} instrumentation because of configuration #{key}")
|
156
|
-
|
157
|
-
"[DEPRECATED] configuration #{key} for #{self.name} will be removed in the next major release. " \
|
158
|
-
"Use `#{config_key}` with one of `#{VALID_CONFIG_VALUES.map(&:to_s).inspect}`"
|
159
|
-
)
|
160
|
-
|
161
|
-
return true
|
154
|
+
true
|
162
155
|
end
|
163
156
|
|
164
157
|
def config_key
|
data/lib/new_relic/version.rb
CHANGED
data/newrelic.yml
CHANGED
@@ -74,7 +74,7 @@ common: &default_settings
|
|
74
74
|
|
75
75
|
# Sets the minimum level a log event must have to be forwarded to New Relic.
|
76
76
|
# This is based on the integer values of Ruby's Logger::Severity constants:
|
77
|
-
# https://github.com/ruby/
|
77
|
+
# https://github.com/ruby/logger/blob/113b82a06b3076b93a71cd467e1605b23afb3088/lib/logger/severity.rb
|
78
78
|
# The intention is to forward logs with the level given to the configuration, as
|
79
79
|
# well as any logs with a higher level of severity.
|
80
80
|
# For example, setting this value to "debug" will forward all log events to New
|
@@ -205,9 +205,8 @@ common: &default_settings
|
|
205
205
|
# monitoring scripts. For now, auto-injection only works with Rails 5.2+.
|
206
206
|
# browser_monitoring.content_security_policy_nonce: true
|
207
207
|
|
208
|
-
# Manual override for the path to your local CA bundle. This CA bundle
|
209
|
-
#
|
210
|
-
# service.
|
208
|
+
# Manual override for the path to your local CA bundle. This CA bundle validates
|
209
|
+
# the SSL certificate presented by New Relic's data collection service.
|
211
210
|
# ca_bundle_path: nil
|
212
211
|
|
213
212
|
# Enable or disable the capture of memcache keys from transaction traces.
|
@@ -323,7 +322,6 @@ common: &default_settings
|
|
323
322
|
# If true, disables agent middleware for Sinatra. This middleware is responsible
|
324
323
|
# for advanced feature support such as cross application tracing, page load
|
325
324
|
# timing, and error collection.
|
326
|
-
#
|
327
325
|
# disable_sinatra_auto_middleware: false
|
328
326
|
|
329
327
|
# If true, disables view instrumentation.
|
@@ -455,6 +453,14 @@ common: &default_settings
|
|
455
453
|
# prepend, chain, disabled.
|
456
454
|
# instrumentation.async_http: auto
|
457
455
|
|
456
|
+
# Controls auto-instrumentation of the aws-sdk-firehose library at start-up. May
|
457
|
+
# be one of auto, prepend, chain, disabled.
|
458
|
+
# instrumentation.aws_sdk_firehose: auto
|
459
|
+
|
460
|
+
# Controls auto-instrumentation of the aws-sdk-kinesis library at start-up. May
|
461
|
+
# be one of auto, prepend, chain, disabled.
|
462
|
+
# instrumentation.aws_sdk_kinesis: auto
|
463
|
+
|
458
464
|
# Controls auto-instrumentation of the aws_sdk_lambda library at start-up. May
|
459
465
|
# be one of auto, prepend, chain, disabled.
|
460
466
|
# instrumentation.aws_sdk_lambda: auto
|
@@ -723,8 +729,8 @@ common: &default_settings
|
|
723
729
|
|
724
730
|
# If true, the agent will operate in a streamlined mode suitable for use with
|
725
731
|
# short-lived serverless functions. NOTE: Only AWS Lambda functions are
|
726
|
-
# supported currently and this option
|
727
|
-
#
|
732
|
+
# supported currently and this option isn't intended for use without New Relic's
|
733
|
+
# Ruby Lambda layer offering.
|
728
734
|
# serverless_mode.enabled: false
|
729
735
|
|
730
736
|
# An array of strings that will collectively serve as a denylist for filtering
|
@@ -795,7 +801,7 @@ common: &default_settings
|
|
795
801
|
# strip_exception_messages.allowed_classes: ""
|
796
802
|
|
797
803
|
# If true, the agent strips messages from all exceptions except those in the
|
798
|
-
#
|
804
|
+
# allowed classes list. Enabled automatically in high security mode.
|
799
805
|
# strip_exception_messages.enabled: false
|
800
806
|
|
801
807
|
# An array of strings to specify which keys and/or values inside a Stripe
|
@@ -803,17 +809,17 @@ common: &default_settings
|
|
803
809
|
# not be reported to New Relic. Each string in this array will be turned into a
|
804
810
|
# regular expression via
|
805
811
|
# Regexp.new to permit advanced matching. For each hash pair, if either the key
|
806
|
-
# or value is matched the
|
807
|
-
#
|
808
|
-
#
|
809
|
-
#
|
812
|
+
# or value is matched the pair
|
813
|
+
# isn't reported. By default, no user_data is reported. Use this option only if
|
814
|
+
# the
|
815
|
+
# stripe.user_data.include option is also used.
|
810
816
|
# stripe.user_data.exclude: []
|
811
817
|
|
812
818
|
# An array of strings to specify which keys inside a Stripe event's user_data
|
813
819
|
# hash should be reported
|
814
820
|
# to New Relic. Each string in this array will be turned into a regular
|
815
821
|
# expression via Regexp.new to
|
816
|
-
#
|
822
|
+
# enable advanced matching. Setting the value to ["."] will report all
|
817
823
|
# user_data.
|
818
824
|
# stripe.user_data.include: []
|
819
825
|
|
@@ -877,7 +883,7 @@ common: &default_settings
|
|
877
883
|
|
878
884
|
# If true, enables the collection of explain plans in transaction traces. This
|
879
885
|
# setting will also apply to explain plans in slow SQL traces if
|
880
|
-
# slow_sql.explain_enabled
|
886
|
+
# slow_sql.explain_enabled isn't set separately.
|
881
887
|
# transaction_tracer.explain_enabled: true
|
882
888
|
|
883
889
|
# Threshold (in seconds) above which the agent will collect explain plans.
|
@@ -956,7 +962,7 @@ common: &default_settings
|
|
956
962
|
# security.agent.enabled: false
|
957
963
|
|
958
964
|
# The port the application is listening on. This setting is mandatory for
|
959
|
-
# Passenger servers.
|
965
|
+
# Passenger servers. The agent detects other servers by default.
|
960
966
|
# security.application_info.port: nil
|
961
967
|
|
962
968
|
# If true, the security agent is started (the agent runs in its event loop)
|
@@ -964,7 +970,7 @@ common: &default_settings
|
|
964
970
|
|
965
971
|
# Defines API paths the security agent should ignore in IAST scans. Accepts an
|
966
972
|
# array of regex patterns matching the URI to ignore. The regex pattern should
|
967
|
-
#
|
973
|
+
# find a complete match for the URL without the endpoint. For example,
|
968
974
|
# [".*account.*"], [".*/\api\/v1\/.*?\/login"]
|
969
975
|
# security.exclude_from_iast_scan.api: []
|
970
976
|
|
@@ -985,8 +991,8 @@ common: &default_settings
|
|
985
991
|
# If true, disables system command injection detection in IAST scans.
|
986
992
|
# security.exclude_from_iast_scan.iast_detection_category.command_injection: false
|
987
993
|
|
988
|
-
# If true, disables the detection of low-severity insecure settings
|
989
|
-
# crypto, cookie, random generators, trust boundary).
|
994
|
+
# If true, disables the detection of low-severity insecure settings. For
|
995
|
+
# example, hash, crypto, cookie, random generators, trust boundary).
|
990
996
|
# security.exclude_from_iast_scan.iast_detection_category.insecure_settings: false
|
991
997
|
|
992
998
|
# If true, disables file operation-related IAST detections (File Access &
|
@@ -1015,8 +1021,8 @@ common: &default_settings
|
|
1015
1021
|
# If true, disables XPATH injection detection in IAST scans.
|
1016
1022
|
# security.exclude_from_iast_scan.iast_detection_category.xpath_injection: false
|
1017
1023
|
|
1018
|
-
#
|
1019
|
-
# differentiate between different test runs,
|
1024
|
+
# A unique test identifier when runnning IAST in a CI/CD environment to
|
1025
|
+
# differentiate between different test runs. For example, a build number.
|
1020
1026
|
# security.iast_test_identifier: nil
|
1021
1027
|
|
1022
1028
|
# Defines the mode for the security agent to operate in. Currently only IAST is
|
@@ -1031,20 +1037,20 @@ common: &default_settings
|
|
1031
1037
|
# disables Reflected Cross-Site Scripting (RXSS) vulnerability detection.
|
1032
1038
|
# security.scan_controllers.report_http_response_body: true
|
1033
1039
|
|
1034
|
-
# The number of application instances for a specific entity
|
1035
|
-
# analysis
|
1040
|
+
# The number of application instances for a specific entity to perform IAST
|
1041
|
+
# analysis on.
|
1036
1042
|
# security.scan_controllers.scan_instance_count: 0
|
1037
1043
|
|
1038
|
-
# If true, allows IAST to continuously gather trace data in the background.
|
1039
|
-
#
|
1040
|
-
#
|
1044
|
+
# If true, allows IAST to continuously gather trace data in the background. The
|
1045
|
+
# security agent uses collected data to perform an IAST scan at the scheduled
|
1046
|
+
# time.
|
1041
1047
|
# security.scan_schedule.always_sample_traces: false
|
1042
1048
|
|
1043
1049
|
# Specifies the delay time (in minutes) before the IAST scan begins after the
|
1044
1050
|
# application starts.
|
1045
1051
|
# security.scan_schedule.delay: 0
|
1046
1052
|
|
1047
|
-
#
|
1053
|
+
# Indicates the duration (in minutes) for which the IAST scan will be performed.
|
1048
1054
|
# security.scan_schedule.duration: 0
|
1049
1055
|
|
1050
1056
|
# Specifies a cron expression that sets when the IAST scan should run.
|
data/test/agent_helper.rb
CHANGED
@@ -115,6 +115,13 @@ def assert_log_contains(log, message)
|
|
115
115
|
"Could not find message: '#{message.inspect}'. Log contained: #{lines.join("\n")}"
|
116
116
|
end
|
117
117
|
|
118
|
+
def refute_log_contains(log, message)
|
119
|
+
lines = log.array
|
120
|
+
|
121
|
+
refute (lines.any? { |line| line.match(message) }),
|
122
|
+
"Found message: '#{message.inspect}'. Log contained: #{lines.join("\n")}"
|
123
|
+
end
|
124
|
+
|
118
125
|
def assert_audit_log_contains(audit_log_contents, needle)
|
119
126
|
# Original request bodies dumped to the log have symbol keys, but once
|
120
127
|
# they go through a dump/load, they're strings again, so we strip
|
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanna McClure
|
8
8
|
- Kayla Reopelle
|
9
9
|
- James Bunch
|
10
10
|
- Hannah Ramadan
|
11
|
-
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: bundler
|
@@ -344,6 +343,7 @@ files:
|
|
344
343
|
- lib/new_relic/agent/external.rb
|
345
344
|
- lib/new_relic/agent/guid_generator.rb
|
346
345
|
- lib/new_relic/agent/harvester.rb
|
346
|
+
- lib/new_relic/agent/health_check.rb
|
347
347
|
- lib/new_relic/agent/heap.rb
|
348
348
|
- lib/new_relic/agent/hostname.rb
|
349
349
|
- lib/new_relic/agent/http_clients/abstract.rb
|
@@ -392,6 +392,14 @@ files:
|
|
392
392
|
- lib/new_relic/agent/instrumentation/async_http/chain.rb
|
393
393
|
- lib/new_relic/agent/instrumentation/async_http/instrumentation.rb
|
394
394
|
- lib/new_relic/agent/instrumentation/async_http/prepend.rb
|
395
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb
|
396
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb
|
397
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb
|
398
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb
|
399
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb
|
400
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb
|
401
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb
|
402
|
+
- lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb
|
395
403
|
- lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb
|
396
404
|
- lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb
|
397
405
|
- lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb
|
@@ -767,7 +775,6 @@ metadata:
|
|
767
775
|
documentation_uri: https://docs.newrelic.com/docs/agents/ruby-agent
|
768
776
|
source_code_uri: https://github.com/newrelic/newrelic-ruby-agent
|
769
777
|
homepage_uri: https://newrelic.com/ruby
|
770
|
-
post_install_message:
|
771
778
|
rdoc_options: []
|
772
779
|
require_paths:
|
773
780
|
- lib
|
@@ -782,8 +789,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
782
789
|
- !ruby/object:Gem::Version
|
783
790
|
version: 1.3.1
|
784
791
|
requirements: []
|
785
|
-
rubygems_version: 3.
|
786
|
-
signing_key:
|
792
|
+
rubygems_version: 3.6.2
|
787
793
|
specification_version: 4
|
788
794
|
summary: New Relic Ruby Agent
|
789
795
|
test_files: []
|