newrelic_rpm 9.14.0 → 9.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +1 -0
  3. data/CHANGELOG.md +139 -5
  4. data/CONTRIBUTING.md +2 -2
  5. data/lib/boot/strap.rb +4 -3
  6. data/lib/new_relic/agent/agent.rb +4 -0
  7. data/lib/new_relic/agent/agent_helpers/connect.rb +3 -0
  8. data/lib/new_relic/agent/agent_helpers/harvest.rb +3 -0
  9. data/lib/new_relic/agent/agent_helpers/shutdown.rb +3 -0
  10. data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +1 -0
  11. data/lib/new_relic/agent/agent_helpers/startup.rb +7 -0
  12. data/lib/new_relic/agent/aws.rb +6 -0
  13. data/lib/new_relic/agent/configuration/default_source.rb +336 -115
  14. data/lib/new_relic/agent/configuration/manager.rb +1 -1
  15. data/lib/new_relic/agent/configuration/yaml_source.rb +6 -1
  16. data/lib/new_relic/agent/database.rb +41 -1
  17. data/lib/new_relic/agent/distributed_tracing.rb +2 -2
  18. data/lib/new_relic/agent/health_check.rb +136 -0
  19. data/lib/new_relic/agent/http_clients/uri_util.rb +1 -1
  20. data/lib/new_relic/agent/instrumentation/active_record.rb +1 -8
  21. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +5 -1
  22. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +9 -16
  23. data/lib/new_relic/agent/instrumentation/active_support_broadcast_logger.rb +0 -2
  24. data/lib/new_relic/agent/instrumentation/active_support_logger.rb +0 -2
  25. data/lib/new_relic/agent/instrumentation/async_http.rb +1 -2
  26. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/chain.rb +21 -0
  27. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/instrumentation.rb +66 -0
  28. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose/prepend.rb +15 -0
  29. data/lib/new_relic/agent/instrumentation/aws_sdk_firehose.rb +22 -0
  30. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/chain.rb +21 -0
  31. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/instrumentation.rb +91 -0
  32. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis/prepend.rb +15 -0
  33. data/lib/new_relic/agent/instrumentation/aws_sdk_kinesis.rb +22 -0
  34. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/chain.rb +33 -0
  35. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/instrumentation.rb +93 -0
  36. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda/prepend.rb +23 -0
  37. data/lib/new_relic/agent/instrumentation/aws_sdk_lambda.rb +23 -0
  38. data/lib/new_relic/agent/instrumentation/aws_sqs.rb +0 -2
  39. data/lib/new_relic/agent/instrumentation/bunny.rb +3 -4
  40. data/lib/new_relic/agent/instrumentation/concurrent_ruby.rb +0 -2
  41. data/lib/new_relic/agent/instrumentation/curb.rb +3 -4
  42. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +0 -4
  43. data/lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb +3 -4
  44. data/lib/new_relic/agent/instrumentation/dynamodb.rb +0 -2
  45. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +1 -0
  46. data/lib/new_relic/agent/instrumentation/elasticsearch.rb +0 -2
  47. data/lib/new_relic/agent/instrumentation/ethon.rb +0 -4
  48. data/lib/new_relic/agent/instrumentation/fiber.rb +0 -2
  49. data/lib/new_relic/agent/instrumentation/grape/instrumentation.rb +0 -3
  50. data/lib/new_relic/agent/instrumentation/grape.rb +1 -3
  51. data/lib/new_relic/agent/instrumentation/httpclient.rb +0 -1
  52. data/lib/new_relic/agent/instrumentation/httprb.rb +0 -1
  53. data/lib/new_relic/agent/instrumentation/httpx.rb +0 -4
  54. data/lib/new_relic/agent/instrumentation/logger.rb +1 -3
  55. data/lib/new_relic/agent/instrumentation/logstasher.rb +0 -2
  56. data/lib/new_relic/agent/instrumentation/memcache.rb +0 -1
  57. data/lib/new_relic/agent/instrumentation/net_http/instrumentation.rb +3 -3
  58. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +0 -2
  59. data/lib/new_relic/agent/instrumentation/opensearch.rb +0 -2
  60. data/lib/new_relic/agent/instrumentation/padrino.rb +3 -3
  61. data/lib/new_relic/agent/instrumentation/rake.rb +0 -1
  62. data/lib/new_relic/agent/instrumentation/rdkafka/chain.rb +2 -1
  63. data/lib/new_relic/agent/instrumentation/rdkafka/prepend.rb +2 -1
  64. data/lib/new_relic/agent/instrumentation/rdkafka.rb +0 -2
  65. data/lib/new_relic/agent/instrumentation/redis.rb +0 -1
  66. data/lib/new_relic/agent/instrumentation/resque.rb +7 -5
  67. data/lib/new_relic/agent/instrumentation/roda.rb +4 -4
  68. data/lib/new_relic/agent/instrumentation/ruby_kafka/prepend.rb +14 -4
  69. data/lib/new_relic/agent/instrumentation/ruby_kafka.rb +0 -2
  70. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delay_extensions.rb +24 -0
  71. data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +1 -1
  72. data/lib/new_relic/agent/instrumentation/sidekiq.rb +9 -1
  73. data/lib/new_relic/agent/instrumentation/sinatra.rb +3 -6
  74. data/lib/new_relic/agent/instrumentation/thread.rb +0 -2
  75. data/lib/new_relic/agent/instrumentation/tilt.rb +0 -4
  76. data/lib/new_relic/agent/instrumentation/typhoeus.rb +0 -1
  77. data/lib/new_relic/agent/instrumentation/view_component/instrumentation.rb +11 -8
  78. data/lib/new_relic/agent/instrumentation/view_component.rb +0 -2
  79. data/lib/new_relic/agent/local_log_decorator.rb +12 -2
  80. data/lib/new_relic/agent/log_event_aggregator.rb +28 -2
  81. data/lib/new_relic/agent/new_relic_service.rb +8 -2
  82. data/lib/new_relic/agent/span_event_primitive.rb +4 -2
  83. data/lib/new_relic/agent/threading/backtrace_node.rb +10 -1
  84. data/lib/new_relic/agent/transaction/message_broker_segment.rb +3 -0
  85. data/lib/new_relic/agent/transaction/tracing.rb +4 -5
  86. data/lib/new_relic/agent/transaction.rb +2 -1
  87. data/lib/new_relic/agent/utilization_data.rb +15 -5
  88. data/lib/new_relic/agent.rb +2 -2
  89. data/lib/new_relic/control/frameworks/rails4.rb +1 -5
  90. data/lib/new_relic/control/instance_methods.rb +5 -0
  91. data/lib/new_relic/dependency_detection.rb +11 -13
  92. data/lib/new_relic/environment_report.rb +1 -5
  93. data/lib/new_relic/helper.rb +15 -0
  94. data/lib/new_relic/language_support.rb +1 -5
  95. data/lib/new_relic/version.rb +1 -1
  96. data/lib/sequel/extensions/new_relic_instrumentation.rb +1 -1
  97. data/lib/tasks/helpers/newrelicyml.rb +4 -2
  98. data/newrelic.yml +174 -66
  99. data/test/agent_helper.rb +8 -1
  100. metadata +17 -19
  101. data/lib/tasks/instrumentation_generator/README.md +0 -63
  102. data/lib/tasks/instrumentation_generator/TODO.md +0 -33
  103. data/lib/tasks/instrumentation_generator/instrumentation.thor +0 -130
  104. data/lib/tasks/instrumentation_generator/templates/Envfile.tt +0 -9
  105. data/lib/tasks/instrumentation_generator/templates/chain.tt +0 -21
  106. data/lib/tasks/instrumentation_generator/templates/chain_method.tt +0 -7
  107. data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +0 -29
  108. data/lib/tasks/instrumentation_generator/templates/instrumentation.tt +0 -13
  109. data/lib/tasks/instrumentation_generator/templates/instrumentation_method.tt +0 -3
  110. data/lib/tasks/instrumentation_generator/templates/newrelic.yml.tt +0 -19
  111. data/lib/tasks/instrumentation_generator/templates/prepend.tt +0 -13
  112. data/lib/tasks/instrumentation_generator/templates/prepend_method.tt +0 -3
  113. data/lib/tasks/instrumentation_generator/templates/test.tt +0 -15
@@ -139,7 +139,7 @@ module NewRelic
139
139
  case Rails::VERSION::MAJOR
140
140
  when 3
141
141
  :rails3
142
- when 4..7
142
+ when 4..8
143
143
  :rails_notifications
144
144
  else
145
145
  ::NewRelic::Agent.logger.warn("Detected untested Rails version #{Rails::VERSION::STRING}")
@@ -387,9 +387,9 @@ module NewRelic
387
387
  :allowed_from_server => false,
388
388
  :description => <<~DESCRIPTION
389
389
  An array of ActiveSupport custom event names to subscribe to and instrument. For example,
390
- - one.custom.event
391
- - another.event
392
- - a.third.event
390
+ - one.custom.event
391
+ - another.event
392
+ - a.third.event
393
393
  DESCRIPTION
394
394
  },
395
395
  :'ai_monitoring.enabled' => {
@@ -407,11 +407,11 @@ module NewRelic
407
407
  :description => <<~DESCRIPTION
408
408
  If `false`, LLM instrumentation (OpenAI only for now) will not capture input and output content on specific LLM events.
409
409
 
410
- The excluded attributes include:
411
- * `content` from LlmChatCompletionMessage events
412
- * `input` from LlmEmbedding events
410
+ The excluded attributes include:
411
+ - `content` from LlmChatCompletionMessage events
412
+ - `input` from LlmEmbedding events
413
413
 
414
- This is an optional security setting to prevent recording sensitive data sent to and received from your LLMs.
414
+ This is an optional security setting to prevent recording sensitive data sent to and received from your LLMs.
415
415
  DESCRIPTION
416
416
  },
417
417
  # this is only set via server side config
@@ -427,6 +427,7 @@ module NewRelic
427
427
  :public => true,
428
428
  :type => String,
429
429
  :allowed_from_server => false,
430
+ :exclude_from_reported_settings => true,
430
431
  :description => 'Your New Relic <InlinePopover type="userKey" />. Required when using the New Relic REST API v2 to record deployments using the `newrelic deployments` command.'
431
432
  },
432
433
  :backport_fast_active_record_connection_lookup => {
@@ -442,7 +443,7 @@ module NewRelic
442
443
  :public => true,
443
444
  :type => String,
444
445
  :allowed_from_server => false,
445
- :description => "Manual override for the path to your local CA bundle. This CA bundle will be used to validate the SSL certificate presented by New Relic's data collection service."
446
+ :description => "Manual override for the path to your local CA bundle. This CA bundle validates the SSL certificate presented by New Relic's data collection service."
446
447
  },
447
448
  :capture_memcache_keys => {
448
449
  :default => false,
@@ -459,9 +460,9 @@ module NewRelic
459
460
  :description => <<~DESCRIPTION
460
461
  When `true`, the agent captures HTTP request parameters and attaches them to transaction traces, traced errors, and [`TransactionError` events](/attribute-dictionary?attribute_name=&events_tids%5B%5D=8241).
461
462
 
462
- <Callout variant="caution">
463
- When using the `capture_params` setting, the Ruby agent will not attempt to filter secret information. `Recommendation:` To filter secret information from request parameters, use the [`attributes.include` setting](/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby) instead. For more information, see the <a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">Ruby attribute examples</a>.
464
- </Callout>
463
+ <Callout variant="caution">
464
+ When using the `capture_params` setting, the Ruby agent will not attempt to filter secret information. `Recommendation:` To filter secret information from request parameters, use the [`attributes.include` setting](/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby) instead. For more information, see the <a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">Ruby attribute examples</a>.
465
+ </Callout>
465
466
  DESCRIPTION
466
467
  },
467
468
  :'clear_transaction_state_after_fork' => {
@@ -471,6 +472,14 @@ module NewRelic
471
472
  :allowed_from_server => false,
472
473
  :description => 'If `true`, the agent will clear `Tracer::State` in `Agent.drop_buffered_data`.'
473
474
  },
475
+ :'cloud.aws.account_id' => {
476
+ :default => nil,
477
+ :public => true,
478
+ :type => String,
479
+ :allow_nil => true,
480
+ :allowed_from_server => false,
481
+ :description => 'The AWS account ID for the AWS account associated with this app'
482
+ },
474
483
  :config_path => {
475
484
  :default => DefaultSource.config_path,
476
485
  :public => true,
@@ -478,10 +487,10 @@ module NewRelic
478
487
  :allowed_from_server => false,
479
488
  :description => <<~DESC
480
489
  Path to `newrelic.yml`. If undefined, the agent checks the following directories (in order):
481
- * `config/newrelic.yml`
482
- * `newrelic.yml`
483
- * `$HOME/.newrelic/newrelic.yml`
484
- * `$HOME/newrelic.yml`
490
+ - `config/newrelic.yml`
491
+ - `newrelic.yml`
492
+ - `$HOME/.newrelic/newrelic.yml`
493
+ - `$HOME/newrelic.yml`
485
494
  DESC
486
495
  },
487
496
  :'exclude_newrelic_header' => {
@@ -637,7 +646,7 @@ module NewRelic
637
646
  :public => true,
638
647
  :type => Boolean,
639
648
  :allowed_from_server => true,
640
- :description => 'If `true`, enables the collection of explain plans in transaction traces. This setting will also apply to explain plans in slow SQL traces if [`slow_sql.explain_enabled`](#slow_sql-explain_enabled) is not set separately.'
649
+ :description => "If `true`, enables the collection of explain plans in transaction traces. This setting will also apply to explain plans in slow SQL traces if [`slow_sql.explain_enabled`](#slow_sql-explain_enabled) isn't set separately."
641
650
  },
642
651
  :'transaction_tracer.explain_threshold' => {
643
652
  :default => 0.5,
@@ -665,13 +674,13 @@ module NewRelic
665
674
  :public => true,
666
675
  :type => String,
667
676
  :allowed_from_server => true,
668
- :description => 'Obfuscation level for SQL queries reported in transaction trace nodes.
669
-
670
- By default, this is set to `obfuscated`, which strips out the numeric and string literals.
671
-
672
- - If you do not want the agent to capture query information, set this to `none`.
673
- - If you want the agent to capture all query information in its original form, set this to `raw`.
674
- - When you enable [high security mode](/docs/agents/manage-apm-agents/configuration/high-security-mode), this is automatically set to `obfuscated`.'
677
+ :description => <<~DESC
678
+ Obfuscation level for SQL queries reported in transaction trace nodes.
679
+ By default, this is set to `obfuscated`, which strips out the numeric and string literals.
680
+ - If you do not want the agent to capture query information, set this to `none`.
681
+ - If you want the agent to capture all query information in its original form, set this to `raw`.
682
+ - When you enable [high security mode](/docs/agents/manage-apm-agents/configuration/high-security-mode), this is automatically set to `obfuscated`.
683
+ DESC
675
684
  },
676
685
 
677
686
  :'transaction_tracer.stack_trace_threshold' => {
@@ -689,20 +698,6 @@ module NewRelic
689
698
  :description => 'Specify a threshold in seconds. Transactions with a duration longer than this threshold are eligible for transaction traces. Specify a float value or the string `apdex_f`.'
690
699
  },
691
700
  # Error collector
692
- :'error_collector.ignore_classes' => {
693
- :default => ['ActionController::RoutingError', 'Sinatra::NotFound'],
694
- :public => true,
695
- :type => Array,
696
- :allowed_from_server => true,
697
- :dynamic_name => true,
698
- :description => <<~DESCRIPTION
699
- A list of error classes that the agent should ignore.
700
-
701
- <Callout variant="caution">
702
- This option can't be set via environment variable.
703
- </Callout>
704
- DESCRIPTION
705
- },
706
701
  :'error_collector.capture_events' => {
707
702
  :default => value_of(:'error_collector.enabled'),
708
703
  :documentation_default => true,
@@ -727,10 +722,9 @@ module NewRelic
727
722
  :dynamic_name => true,
728
723
  :description => <<~DESCRIPTION
729
724
  A list of error classes that the agent should treat as expected.
730
-
731
- <Callout variant="caution">
732
- This option can't be set via environment variable.
733
- </Callout>
725
+ <Callout variant="caution">
726
+ This option can't be set via environment variable.
727
+ </Callout>
734
728
  DESCRIPTION
735
729
  },
736
730
  :'error_collector.expected_messages' => {
@@ -741,10 +735,9 @@ module NewRelic
741
735
  :dynamic_name => true,
742
736
  :description => <<~DESCRIPTION
743
737
  A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be treated as expected.
744
-
745
- <Callout variant="caution">
746
- This option can't be set via environment variable.
747
- </Callout>
738
+ <Callout variant="caution">
739
+ This option can't be set via environment variable.
740
+ </Callout>
748
741
  DESCRIPTION
749
742
  },
750
743
  :'error_collector.expected_status_codes' => {
@@ -755,19 +748,30 @@ module NewRelic
755
748
  :dynamic_name => true,
756
749
  :description => 'A comma separated list of status codes, possibly including ranges. Errors associated with these status codes, where applicable, will be treated as expected.'
757
750
  },
758
-
751
+ :'error_collector.ignore_classes' => {
752
+ :default => ['ActionController::RoutingError', 'Sinatra::NotFound'],
753
+ :public => true,
754
+ :type => Array,
755
+ :allowed_from_server => true,
756
+ :dynamic_name => true,
757
+ :description => <<~DESCRIPTION
758
+ A list of error classes that the agent should ignore.
759
+ <Callout variant="caution">
760
+ This option can't be set via environment variable.
761
+ </Callout>
762
+ DESCRIPTION
763
+ },
759
764
  :'error_collector.ignore_messages' => {
760
- :default => {},
765
+ :default => {'ThreadError' => ['queue empty']},
761
766
  :public => true,
762
767
  :type => Hash,
763
768
  :allowed_from_server => true,
764
769
  :dynamic_name => true,
765
770
  :description => <<~DESCRIPTION
766
771
  A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be ignored.
767
-
768
- <Callout variant="caution">
769
- This option can't be set via environment variable.
770
- </Callout>
772
+ <Callout variant="caution">
773
+ This option can't be set via environment variable.
774
+ </Callout>
771
775
  DESCRIPTION
772
776
  },
773
777
  :'error_collector.ignore_status_codes' => {
@@ -849,19 +853,19 @@ module NewRelic
849
853
  :description => <<~DESCRIPTION
850
854
  Sets the minimum level a log event must have to be forwarded to New Relic.
851
855
 
852
- This is based on the integer values of Ruby's `Logger::Severity` constants: https://github.com/ruby/ruby/blob/master/lib/logger/severity.rb
856
+ This is based on the integer values of [Ruby's `Logger::Severity` constants](https://github.com/ruby/logger/blob/113b82a06b3076b93a71cd467e1605b23afb3088/lib/logger/severity.rb).
853
857
 
854
858
  The intention is to forward logs with the level given to the configuration, as well as any logs with a higher level of severity.
855
859
 
856
860
  For example, setting this value to "debug" will forward all log events to New Relic. Setting this value to "error" will only forward log events with the levels "error", "fatal", and "unknown".
857
861
 
858
862
  Valid values (ordered lowest to highest):
859
- * "debug"
860
- * "info"
861
- * "warn"
862
- * "error"
863
- * "fatal"
864
- * "unknown"
863
+ - "debug"
864
+ - "info"
865
+ - "warn"
866
+ - "error"
867
+ - "fatal"
868
+ - "unknown"
865
869
  DESCRIPTION
866
870
  },
867
871
  :'application_logging.forwarding.custom_attributes' => {
@@ -872,6 +876,21 @@ module NewRelic
872
876
  :allowed_from_server => false,
873
877
  :description => 'A hash with key/value pairs to add as custom attributes to all log events forwarded to New Relic. If sending using an environment variable, the value must be formatted like: "key1=value1,key2=value2"'
874
878
  },
879
+ :'application_logging.forwarding.labels.enabled' => {
880
+ :default => false,
881
+ :public => true,
882
+ :type => Boolean,
883
+ :allowed_from_server => false,
884
+ :description => 'If `true`, the agent attaches [labels](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#labels) to log records.'
885
+ },
886
+ :'application_logging.forwarding.labels.exclude' => {
887
+ :default => [],
888
+ :public => true,
889
+ :type => Array,
890
+ :transform => DefaultSource.method(:convert_to_list),
891
+ :allowed_from_server => false,
892
+ :description => 'A case-insensitive array or comma-delimited string containing the labels to exclude from log records.'
893
+ },
875
894
  :'application_logging.forwarding.max_samples_stored' => {
876
895
  :default => 10000,
877
896
  :public => true,
@@ -1159,13 +1178,13 @@ module NewRelic
1159
1178
  :allowed_from_server => false,
1160
1179
  :transform => proc { |arr| NewRelic::Agent.add_automatic_method_tracers(arr) },
1161
1180
  :description => <<~DESCRIPTION
1162
- An array of `CLASS#METHOD` (for instance methods) and/or `CLASS.METHOD` (for class methods) strings representing Ruby methods for the agent to automatically add custom instrumentation to without the need for altering any of the source code that defines the methods.
1181
+ An array of `CLASS#METHOD` (for instance methods) and/or `CLASS.METHOD` (for class methods) strings representing Ruby methods that the agent can automatically add custom instrumentation to. This doesn't require any modifications of the source code that defines the methods.
1163
1182
 
1164
1183
  Use fully qualified class names (using the `::` delimiter) that include any module or class namespacing.
1165
1184
 
1166
1185
  Here is some Ruby source code that defines a `render_png` instance method for an `Image` class and a `notify` class method for a `User` class, both within a `MyCompany` module namespace:
1167
1186
 
1168
- ```
1187
+ ```rb
1169
1188
  module MyCompany
1170
1189
  class Image
1171
1190
  def render_png
@@ -1183,21 +1202,21 @@ module NewRelic
1183
1202
 
1184
1203
  Given that source code, the `newrelic.yml` config file might request instrumentation for both of these methods like so:
1185
1204
 
1186
- ```
1205
+ ```yaml
1187
1206
  automatic_custom_instrumentation_method_list:
1188
1207
  - MyCompany::Image#render_png
1189
1208
  - MyCompany::User.notify
1190
1209
  ```
1191
1210
 
1192
- That configuration example uses YAML array syntax to specify both methods. Alternatively, a comma-delimited string can be used instead:
1211
+ That configuration example uses YAML array syntax to specify both methods. Alternatively, you can use a comma-delimited string:
1193
1212
 
1194
- ```
1213
+ ```yaml
1195
1214
  automatic_custom_instrumentation_method_list: 'MyCompany::Image#render_png, MyCompany::User.notify'
1196
1215
  ```
1197
1216
 
1198
- Whitespace around the comma(s) in the list is optional. When configuring the agent with a list of methods via the `NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST` environment variable, this comma-delimited string format should be used:
1217
+ Whitespace around the comma(s) in the list is optional. When configuring the agent with a list of methods via the `NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST` environment variable, use this comma-delimited string format:
1199
1218
 
1200
- ```
1219
+ ```sh
1201
1220
  export NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST='MyCompany::Image#render_png, MyCompany::User.notify'
1202
1221
  ```
1203
1222
  DESCRIPTION
@@ -1218,8 +1237,8 @@ module NewRelic
1218
1237
  :dynamic_name => true,
1219
1238
  # Keep the extra two-space indent before the second bullet to appease translation tool
1220
1239
  :description => <<~DESC
1221
- * Specify a maximum number of custom events to buffer in memory at a time.
1222
- * When configuring the agent for [AI monitoring](/docs/ai-monitoring/intro-to-ai-monitoring), \
1240
+ - Specify a maximum number of custom events to buffer in memory at a time.
1241
+ - When configuring the agent for [AI monitoring](/docs/ai-monitoring/intro-to-ai-monitoring), \
1223
1242
  set to max value `100000`. This ensures the agent captures the maximum amount of LLM events.
1224
1243
  DESC
1225
1244
  },
@@ -1286,6 +1305,7 @@ module NewRelic
1286
1305
  :default => false,
1287
1306
  :public => true,
1288
1307
  :type => Boolean,
1308
+ :aliases => %i[disable_active_job],
1289
1309
  :allowed_from_server => false,
1290
1310
  :description => 'If `true`, disables Active Job instrumentation.'
1291
1311
  },
@@ -1360,9 +1380,9 @@ module NewRelic
1360
1380
  :description => <<~DESCRIPTION
1361
1381
  If `true`, the agent won't wrap third-party middlewares in instrumentation (regardless of whether they are installed via `Rack::Builder` or Rails).
1362
1382
 
1363
- <Callout variant="important">
1364
- When middleware instrumentation is disabled, if an application is using middleware that could alter the response code, the HTTP status code reported on the transaction may not reflect the altered value.
1365
- </Callout>
1383
+ <Callout variant="important">
1384
+ When middleware instrumentation is disabled, if an application is using middleware that could alter the response code, the HTTP status code reported on the transaction may not reflect the altered value.
1385
+ </Callout>
1366
1386
  DESCRIPTION
1367
1387
  },
1368
1388
  :disable_samplers => {
@@ -1401,20 +1421,18 @@ module NewRelic
1401
1421
  :description => <<~DESCRIPTION
1402
1422
  If `true`, disables agent middleware for Sinatra. This middleware is responsible for advanced feature support such as [cross application tracing](/docs/apm/transactions/cross-application-traces/cross-application-tracing), [page load timing](/docs/browser/new-relic-browser/getting-started/new-relic-browser), and [error collection](/docs/apm/applications-menu/events/view-apm-error-analytics).
1403
1423
 
1404
- <Callout variant="important">
1405
- Cross application tracing is deprecated in favor of [distributed tracing](/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing). Distributed tracing is on by default for Ruby agent versions 8.0.0 and above. Middlewares are not required to support distributed tracing.
1424
+ <Callout variant="important">
1425
+ Cross application tracing is deprecated in favor of [distributed tracing](/docs/apm/distributed-tracing/getting-started/introduction-distributed-tracing). Distributed tracing is on by default for Ruby agent versions 8.0.0 and above. Middlewares are not required to support distributed tracing.
1406
1426
 
1407
- To continue using cross application tracing, update the following options in your `newrelic.yml` configuration file:
1427
+ To continue using cross application tracing, update the following options in your `newrelic.yml` configuration file:
1408
1428
 
1409
- ```yaml
1410
- # newrelic.yml
1411
-
1412
- cross_application_tracer:
1413
- enabled: true
1414
- distributed_tracing:
1415
- enabled: false
1416
- ```
1417
- </Callout>
1429
+ ```yaml
1430
+ cross_application_tracer:
1431
+ enabled: true
1432
+ distributed_tracing:
1433
+ enabled: false
1434
+ ```
1435
+ </Callout>
1418
1436
  DESCRIPTION
1419
1437
  },
1420
1438
  :disable_view_instrumentation => {
@@ -1441,6 +1459,13 @@ module NewRelic
1441
1459
  :description => 'Distributed tracing lets you see the path that a request takes through your distributed system. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the [transition guide](/docs/transition-guide-distributed-tracing) before you enable this feature.'
1442
1460
  },
1443
1461
  # Elasticsearch
1462
+ :'elasticsearch.capture_cluster_name' => {
1463
+ :default => true,
1464
+ :public => true,
1465
+ :type => Boolean,
1466
+ :allowed_from_server => true,
1467
+ :description => 'If `true`, the agent captures the Elasticsearch cluster name in transaction traces.'
1468
+ },
1444
1469
  :'elasticsearch.capture_queries' => {
1445
1470
  :default => true,
1446
1471
  :public => true,
@@ -1528,6 +1553,33 @@ module NewRelic
1528
1553
  :allowed_from_server => false,
1529
1554
  :description => 'Controls auto-instrumentation of bunny at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.'
1530
1555
  },
1556
+ :'instrumentation.aws_sdk_firehose' => {
1557
+ :default => 'auto',
1558
+ :documentation_default => 'auto',
1559
+ :public => true,
1560
+ :type => String,
1561
+ :dynamic_name => true,
1562
+ :allowed_from_server => false,
1563
+ :description => 'Controls auto-instrumentation of the aws-sdk-firehose library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.'
1564
+ },
1565
+ :'instrumentation.aws_sdk_lambda' => {
1566
+ :default => 'auto',
1567
+ :documentation_default => 'auto',
1568
+ :public => true,
1569
+ :type => String,
1570
+ :dynamic_name => true,
1571
+ :allowed_from_server => false,
1572
+ :description => 'Controls auto-instrumentation of the aws_sdk_lambda library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.'
1573
+ },
1574
+ :'instrumentation.aws_sdk_kinesis' => {
1575
+ :default => 'auto',
1576
+ :documentation_default => 'auto',
1577
+ :public => true,
1578
+ :type => String,
1579
+ :dynamic_name => true,
1580
+ :allowed_from_server => false,
1581
+ :description => 'Controls auto-instrumentation of the aws-sdk-kinesis library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.'
1582
+ },
1531
1583
  :'instrumentation.ruby_kafka' => {
1532
1584
  :default => 'auto',
1533
1585
  :public => true,
@@ -1878,7 +1930,7 @@ module NewRelic
1878
1930
  :description => <<~DESCRIPTION
1879
1931
  An array of strings to specify which keys inside a Stripe event's `user_data` hash should be reported
1880
1932
  to New Relic. Each string in this array will be turned into a regular expression via `Regexp.new` to
1881
- permit advanced matching. Setting the value to `["."]` will report all `user_data`.
1933
+ enable advanced matching. Setting the value to `["."]` will report all `user_data`.
1882
1934
  DESCRIPTION
1883
1935
  },
1884
1936
  :'stripe.user_data.exclude' => {
@@ -1891,9 +1943,9 @@ module NewRelic
1891
1943
  :description => <<~DESCRIPTION
1892
1944
  An array of strings to specify which keys and/or values inside a Stripe event's `user_data` hash should
1893
1945
  not be reported to New Relic. Each string in this array will be turned into a regular expression via
1894
- `Regexp.new` to permit advanced matching. For each hash pair, if either the key or value is matched the
1895
- pair will not be reported. By default, no `user_data` is reported, so this option should only be used if
1896
- the `stripe.user_data.include` option is being used.
1946
+ `Regexp.new` to permit advanced matching. For each hash pair, if either the key or value is matched the pair
1947
+ isn't reported. By default, no `user_data` is reported. Use this option only if the
1948
+ `stripe.user_data.include` option is also used.
1897
1949
  DESCRIPTION
1898
1950
  },
1899
1951
  :'instrumentation.thread' => {
@@ -1994,7 +2046,7 @@ module NewRelic
1994
2046
  If `true`, when the agent is in an application using Ruby on Rails, it will start after `config/initializers` run.
1995
2047
 
1996
2048
  <Callout variant="caution">
1997
- This option may only be set by environment variable.
2049
+ This option may only be set by environment variable.
1998
2050
  </Callout>
1999
2051
  DESCRIPTION
2000
2052
  },
@@ -2036,7 +2088,7 @@ module NewRelic
2036
2088
  :transform => proc { |bool| NewRelic::Agent::ServerlessHandler.env_var_set? || bool },
2037
2089
  :description => 'If `true`, the agent will operate in a streamlined mode suitable for use with short-lived ' \
2038
2090
  'serverless functions. NOTE: Only AWS Lambda functions are supported currently and this ' \
2039
- "option is not intended for use without [New Relic's Ruby Lambda layer](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/monitoring-aws-lambda-serverless-monitoring/) offering."
2091
+ "option isn't intended for use without [New Relic's Ruby Lambda layer](https://docs.newrelic.com/docs/serverless-function-monitoring/aws-lambda-monitoring/get-started/monitoring-aws-lambda-serverless-monitoring/) offering."
2040
2092
  },
2041
2093
  # Sidekiq
2042
2094
  :'sidekiq.args.include' => {
@@ -2132,8 +2184,8 @@ module NewRelic
2132
2184
  :allowed_from_server => true,
2133
2185
  # Keep the extra two-space indent before the second bullet to appease translation tool
2134
2186
  :description => <<~DESC
2135
- * Defines the maximum number of span events reported from a single harvest. Any Integer between `1` and `10000` is valid.'
2136
- * When configuring the agent for [AI monitoring](/docs/ai-monitoring/intro-to-ai-monitoring), set to max value `10000`.\
2187
+ - Defines the maximum number of span events reported from a single harvest. Any Integer between `1` and `10000` is valid.'
2188
+ - When configuring the agent for [AI monitoring](/docs/ai-monitoring/intro-to-ai-monitoring), set to max value `10000`.\
2137
2189
  This ensures the agent captures the maximum amount of distributed traces.
2138
2190
  DESC
2139
2191
  },
@@ -2144,7 +2196,7 @@ module NewRelic
2144
2196
  :public => true,
2145
2197
  :type => Boolean,
2146
2198
  :allowed_from_server => false,
2147
- :description => 'If true, the agent strips messages from all exceptions except those in the [allowlist](#strip_exception_messages-allowlist). Enabled automatically in [high security mode](/docs/accounts-partnerships/accounts/security/high-security).'
2199
+ :description => 'If true, the agent strips messages from all exceptions except those in the [allowed classes list](#strip_exception_messages-allowed_classes). Enabled automatically in [high security mode](/docs/accounts-partnerships/accounts/security/high-security).'
2148
2200
  },
2149
2201
  :'strip_exception_messages.allowed_classes' => {
2150
2202
  :default => '',
@@ -2154,6 +2206,28 @@ module NewRelic
2154
2206
  :transform => DefaultSource.method(:convert_to_constant_list),
2155
2207
  :description => 'Specify a list of exceptions you do not want the agent to strip when [strip_exception_messages](#strip_exception_messages-enabled) is `true`. Separate exceptions with a comma. For example, `"ImportantException,PreserveMessageException"`.'
2156
2208
  },
2209
+ # Agent Control
2210
+ :'agent_control.enabled' => {
2211
+ :default => false,
2212
+ :public => false,
2213
+ :type => Boolean,
2214
+ :allowed_from_server => false,
2215
+ :description => 'Boolean value that denotes whether Agent Control functionality should be enabled. At the moment, this functionality is limited to whether agent health should be reported. This configuration will be set using an environment variable by Agent Control, or one of its components, prior to agent startup.'
2216
+ },
2217
+ :'agent_control.health.delivery_location' => {
2218
+ :default => '/newrelic/apm/health',
2219
+ :public => false,
2220
+ :type => String,
2221
+ :allowed_from_server => false,
2222
+ :description => 'A `file:` URI that specifies the fully qualified directory path for health file(s) to be written to. This defaults to: `file:///newrelic/apm/health`. This configuration will be set using an environment variable by Agent Control, or one of its components, prior to agent startup.'
2223
+ },
2224
+ :'agent_control.health.frequency' => {
2225
+ :default => 5,
2226
+ :public => false,
2227
+ :type => Integer,
2228
+ :allowed_from_server => false,
2229
+ :description => 'The interval, in seconds, of how often the health file(s) will be written to. This configuration will be set using an environment variable by Agent Control, or one of its components, prior to agent startup.'
2230
+ },
2157
2231
  # Thread profiler
2158
2232
  :'thread_profiler.enabled' => {
2159
2233
  :default => DefaultSource.thread_profiler_enabled,
@@ -2454,11 +2528,9 @@ module NewRelic
2454
2528
  :allowlist => %i[none low medium high],
2455
2529
  :external => :infinite_tracing,
2456
2530
  :description => <<~DESC
2457
- Configure the compression level for data sent to the trace observer.
2458
-
2459
- May be one of: `:none`, `:low`, `:medium`, `:high`.
2460
-
2461
- Set the level to `:none` to disable compression.
2531
+ Configure the compression level for data sent to the trace observer. \
2532
+ May be one of: `:none`, `:low`, `:medium`, `:high`. \
2533
+ Set the level to `:none` to disable compression.
2462
2534
  DESC
2463
2535
  },
2464
2536
  :js_agent_file => {
@@ -2685,47 +2757,196 @@ module NewRelic
2685
2757
  :description => 'Defines the endpoint URL for posting security-related data',
2686
2758
  :dynamic_name => true
2687
2759
  },
2688
- :'security.detection.rci.enabled' => {
2689
- :default => true,
2760
+ :'security.application_info.port' => {
2761
+ :default => nil,
2762
+ :allow_nil => true,
2763
+ :public => true,
2764
+ :type => Integer,
2765
+ :external => true,
2766
+ :allowed_from_server => false,
2767
+ :description => 'The port the application is listening on. This setting is mandatory for Passenger servers. The agent detects other servers by default.'
2768
+ },
2769
+ :'security.exclude_from_iast_scan.api' => {
2770
+ :default => [],
2771
+ :public => true,
2772
+ :type => Array,
2773
+ :external => true,
2774
+ :allowed_from_server => true,
2775
+ :transform => DefaultSource.method(:convert_to_list),
2776
+ :description => 'Defines API paths the security agent should ignore in IAST scans. Accepts an array of regex patterns matching the URI to ignore. The regex pattern should find a complete match for the URL without the endpoint. For example, `[".*account.*"], [".*/\api\/v1\/.*?\/login"]`'
2777
+ },
2778
+ :'security.exclude_from_iast_scan.http_request_parameters.header' => {
2779
+ :default => [],
2780
+ :public => true,
2781
+ :type => Array,
2782
+ :external => true,
2783
+ :allowed_from_server => true,
2784
+ :transform => DefaultSource.method(:convert_to_list),
2785
+ :description => 'An array of HTTP request headers the security agent should ignore in IAST scans. The array should specify a list of patterns matching the headers to ignore.'
2786
+ },
2787
+ :'security.exclude_from_iast_scan.http_request_parameters.query' => {
2788
+ :default => [],
2789
+ :public => true,
2790
+ :type => Array,
2791
+ :external => true,
2792
+ :allowed_from_server => true,
2793
+ :transform => DefaultSource.method(:convert_to_list),
2794
+ :description => 'An array of HTTP request query parameters the security agent should ignore in IAST scans. The array should specify a list of patterns matching the HTTP request query parameters to ignore.'
2795
+ },
2796
+ :'security.exclude_from_iast_scan.http_request_parameters.body' => {
2797
+ :default => [],
2798
+ :public => true,
2799
+ :type => Array,
2800
+ :external => true,
2801
+ :allowed_from_server => true,
2802
+ :transform => DefaultSource.method(:convert_to_list),
2803
+ :description => 'An array of HTTP request body keys the security agent should ignore in IAST scans.'
2804
+ },
2805
+ :'security.exclude_from_iast_scan.iast_detection_category.insecure_settings' => {
2806
+ :default => false,
2690
2807
  :external => true,
2691
2808
  :public => true,
2692
2809
  :type => Boolean,
2693
2810
  :allowed_from_server => false,
2694
- :description => 'If `true`, enables RCI (remote code injection) detection'
2811
+ :description => 'If `true`, disables the detection of low-severity insecure settings. For example, hash, crypto, cookie, random generators, trust boundary).'
2695
2812
  },
2696
- :'security.detection.rxss.enabled' => {
2697
- :default => true,
2813
+ :'security.exclude_from_iast_scan.iast_detection_category.invalid_file_access' => {
2814
+ :default => false,
2698
2815
  :external => true,
2699
2816
  :public => true,
2700
2817
  :type => Boolean,
2701
2818
  :allowed_from_server => false,
2702
- :description => 'If `true`, enables RXSS (reflected cross-site scripting) detection'
2819
+ :description => 'If `true`, disables file operation-related IAST detections (File Access & Application integrity violation)'
2703
2820
  },
2704
- :'security.detection.deserialization.enabled' => {
2705
- :default => true,
2821
+ :'security.exclude_from_iast_scan.iast_detection_category.sql_injection' => {
2822
+ :default => false,
2706
2823
  :external => true,
2707
2824
  :public => true,
2708
2825
  :type => Boolean,
2709
2826
  :allowed_from_server => false,
2710
- :description => 'If `true`, enables deserialization detection'
2827
+ :description => 'If `true`, disables SQL injection detection in IAST scans.'
2711
2828
  },
2712
- :'security.application_info.port' => {
2713
- :default => nil,
2714
- :allow_nil => true,
2829
+ :'security.exclude_from_iast_scan.iast_detection_category.nosql_injection' => {
2830
+ :default => false,
2831
+ :external => true,
2715
2832
  :public => true,
2716
- :type => Integer,
2833
+ :type => Boolean,
2834
+ :allowed_from_server => false,
2835
+ :description => 'If `true`, disables NOSQL injection detection in IAST scans.'
2836
+ },
2837
+ :'security.exclude_from_iast_scan.iast_detection_category.ldap_injection' => {
2838
+ :default => false,
2717
2839
  :external => true,
2840
+ :public => true,
2841
+ :type => Boolean,
2718
2842
  :allowed_from_server => false,
2719
- :description => 'The port the application is listening on. This setting is mandatory for Passenger servers. Other servers should be detected by default.'
2843
+ :description => 'If `true`, disables LDAP injection detection in IAST scans.'
2720
2844
  },
2721
- :'security.request.body_limit' => {
2722
- :default => 300,
2723
- :allow_nil => true,
2845
+ :'security.exclude_from_iast_scan.iast_detection_category.javascript_injection' => {
2846
+ :default => false,
2847
+ :external => true,
2848
+ :public => true,
2849
+ :type => Boolean,
2850
+ :allowed_from_server => false,
2851
+ :description => 'If `true`, disables Javascript injection detection in IAST scans.'
2852
+ },
2853
+ :'security.exclude_from_iast_scan.iast_detection_category.command_injection' => {
2854
+ :default => false,
2855
+ :external => true,
2856
+ :public => true,
2857
+ :type => Boolean,
2858
+ :allowed_from_server => false,
2859
+ :description => 'If `true`, disables system command injection detection in IAST scans.'
2860
+ },
2861
+ :'security.exclude_from_iast_scan.iast_detection_category.xpath_injection' => {
2862
+ :default => false,
2863
+ :external => true,
2864
+ :public => true,
2865
+ :type => Boolean,
2866
+ :allowed_from_server => false,
2867
+ :description => 'If `true`, disables XPATH injection detection in IAST scans.'
2868
+ },
2869
+ :'security.exclude_from_iast_scan.iast_detection_category.ssrf' => {
2870
+ :default => false,
2871
+ :external => true,
2872
+ :public => true,
2873
+ :type => Boolean,
2874
+ :allowed_from_server => false,
2875
+ :description => 'If `true`, disables Sever-Side Request Forgery (SSRF) detection in IAST scans.'
2876
+ },
2877
+ :'security.exclude_from_iast_scan.iast_detection_category.rxss' => {
2878
+ :default => false,
2879
+ :external => true,
2880
+ :public => true,
2881
+ :type => Boolean,
2882
+ :allowed_from_server => false,
2883
+ :description => 'If `true`, disables Reflected Cross-Site Scripting (RXSS) detection in IAST scans.'
2884
+ },
2885
+ :'security.scan_schedule.delay' => {
2886
+ :default => 0,
2887
+ :public => true,
2888
+ :type => Integer,
2889
+ :external => true,
2890
+ :allowed_from_server => true,
2891
+ :description => 'Specifies the delay time (in minutes) before the IAST scan begins after the application starts.'
2892
+ },
2893
+ :'security.scan_schedule.duration' => {
2894
+ :default => 0,
2724
2895
  :public => true,
2725
2896
  :type => Integer,
2726
2897
  :external => true,
2898
+ :allowed_from_server => true,
2899
+ :description => 'Indicates the duration (in minutes) for which the IAST scan will be performed.'
2900
+ },
2901
+ :'security.scan_schedule.schedule' => {
2902
+ :default => '',
2903
+ :public => true,
2904
+ :type => String,
2905
+ :external => true,
2906
+ :allowed_from_server => true,
2907
+ :description => 'Specifies a cron expression that sets when the IAST scan should run.',
2908
+ :dynamic_name => true
2909
+ },
2910
+ :'security.scan_schedule.always_sample_traces' => {
2911
+ :default => false,
2912
+ :external => true,
2913
+ :public => true,
2914
+ :type => Boolean,
2727
2915
  :allowed_from_server => false,
2728
- :description => 'Defines the request body limit to process in security events (in KB). The default value is 300, for 300KB.'
2916
+ :description => 'If `true`, allows IAST to continuously gather trace data in the background. The security agent uses collected data to perform an IAST scan at the scheduled time.'
2917
+ },
2918
+ :'security.scan_controllers.iast_scan_request_rate_limit' => {
2919
+ :default => 3600,
2920
+ :public => true,
2921
+ :type => Integer,
2922
+ :external => true,
2923
+ :allowed_from_server => true,
2924
+ :description => 'Sets the maximum number of HTTP requests allowed for the IAST scan per minute. Any Integer between 12 and 3600 is valid. The default value is 3600.'
2925
+ },
2926
+ :'security.scan_controllers.scan_instance_count' => {
2927
+ :default => 0,
2928
+ :public => true,
2929
+ :type => Integer,
2930
+ :external => true,
2931
+ :allowed_from_server => true,
2932
+ :description => 'The number of application instances for a specific entity to perform IAST analysis on.'
2933
+ },
2934
+ :'security.scan_controllers.report_http_response_body' => {
2935
+ :default => true,
2936
+ :public => true,
2937
+ :type => Boolean,
2938
+ :external => true,
2939
+ :allowed_from_server => true,
2940
+ :description => 'If `true`, enables the sending of HTTP responses bodies. Disabling this also disables Reflected Cross-Site Scripting (RXSS) vulnerability detection.'
2941
+ },
2942
+ :'security.iast_test_identifier' => {
2943
+ :default => nil,
2944
+ :allow_nil => true,
2945
+ :public => true,
2946
+ :type => String,
2947
+ :external => true,
2948
+ :allowed_from_server => true,
2949
+ :description => 'A unique test identifier when runnning IAST in a CI/CD environment to differentiate between different test runs. For example, a build number.'
2729
2950
  }
2730
2951
  }.freeze
2731
2952
  # rubocop:enable Metrics/CollectionLiteralLength