newrelic_rpm 9.10.2 → 9.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +91 -1
  3. data/README.md +1 -1
  4. data/lib/new_relic/agent/agent_logger.rb +1 -0
  5. data/lib/new_relic/agent/configuration/default_source.rb +114 -3
  6. data/lib/new_relic/agent/database/obfuscator.rb +1 -0
  7. data/lib/new_relic/agent/error_collector.rb +14 -10
  8. data/lib/new_relic/agent/instrumentation/aws_sqs/chain.rb +37 -0
  9. data/lib/new_relic/agent/instrumentation/aws_sqs/instrumentation.rb +67 -0
  10. data/lib/new_relic/agent/instrumentation/aws_sqs/prepend.rb +21 -0
  11. data/lib/new_relic/agent/instrumentation/aws_sqs.rb +25 -0
  12. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +14 -0
  13. data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +1 -1
  14. data/lib/new_relic/agent/instrumentation/logstasher/chain.rb +21 -0
  15. data/lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb +24 -0
  16. data/lib/new_relic/agent/instrumentation/logstasher/prepend.rb +13 -0
  17. data/lib/new_relic/agent/instrumentation/logstasher.rb +27 -0
  18. data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +3 -0
  19. data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +9 -5
  20. data/lib/new_relic/agent/instrumentation/redis/cluster_middleware.rb +26 -0
  21. data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +14 -11
  22. data/lib/new_relic/agent/instrumentation/redis/middleware.rb +3 -0
  23. data/lib/new_relic/agent/instrumentation/redis.rb +5 -0
  24. data/lib/new_relic/agent/instrumentation/stripe_subscriber.rb +22 -1
  25. data/lib/new_relic/agent/local_log_decorator.rb +8 -1
  26. data/lib/new_relic/agent/log_event_aggregator.rb +91 -26
  27. data/lib/new_relic/control/instance_methods.rb +1 -0
  28. data/lib/new_relic/control/private_instance_methods.rb +4 -0
  29. data/lib/new_relic/control/security_interface.rb +57 -0
  30. data/lib/new_relic/control.rb +1 -1
  31. data/lib/new_relic/rack/browser_monitoring.rb +11 -7
  32. data/lib/new_relic/version.rb +2 -2
  33. data/lib/tasks/config.rake +5 -2
  34. data/lib/tasks/gha.rake +31 -0
  35. data/lib/tasks/helpers/config.html.erb +1 -1
  36. data/lib/tasks/helpers/format.rb +1 -1
  37. data/lib/tasks/helpers/newrelicyml.rb +3 -2
  38. data/lib/tasks/instrumentation_generator/instrumentation.thor +1 -0
  39. data/newrelic.yml +202 -135
  40. data/newrelic_rpm.gemspec +2 -0
  41. data/test/agent_helper.rb +9 -0
  42. metadata +42 -3
@@ -0,0 +1,31 @@
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 'yaml'
6
+ require_relative 'helpers/version_bump'
7
+
8
+ # gha = GitHub Actions
9
+ namespace :gha do
10
+ # See .github/versions.yml
11
+ desc 'Update 3rd party action versions across all workflows'
12
+ task :update_versions do
13
+ gh_dir = File.expand_path('../../../.github', __FILE__)
14
+ info = YAML.load_file(File.join(gh_dir, 'versions.yml'))
15
+ workflows = Dir.glob(File.join(gh_dir, 'workflows', '*.yml'))
16
+ workflows.each do |workflow|
17
+ original = File.read(workflow)
18
+ modified = original.dup
19
+ info.each do |action, settings|
20
+ modified.gsub!(/uses: #{action}.*$/, "uses: #{action}@#{settings[:sha]} # tag #{settings[:tag]}")
21
+ end
22
+
23
+ if original != modified
24
+ File.open(workflow, 'w') { |f| f.puts modified }
25
+ puts "Updated #{workflow} with changes"
26
+ else
27
+ puts "#{workflow} remains unchanged"
28
+ end
29
+ end
30
+ end
31
+ end
@@ -76,7 +76,7 @@ When running the Ruby agent in a Rails app, the agent first looks for the `NEW_R
76
76
  When you edit the config file, be sure to:
77
77
 
78
78
  * Indent only with two spaces.
79
- * Indent only where relevant, in sections such as <DoNotTranslate>**`error_collector`**</DoNotTranslate>.
79
+ * Indent only where relevant, in sections such as **`error_collector`**.
80
80
 
81
81
  If you do not indent correctly, the agent may throw an `Unable to parse configuration file` error on startup.
82
82
 
@@ -69,7 +69,7 @@ module Format
69
69
 
70
70
  def format_description(value)
71
71
  description = ''
72
- description += '<DoNotTranslate>**DEPRECATED**</DoNotTranslate>' if value[:deprecated]
72
+ description += '<DNT>**DEPRECATED**</DNT> ' if value[:deprecated]
73
73
  description += value[:description]
74
74
  description
75
75
  end
@@ -105,8 +105,9 @@ module NewRelicYML
105
105
  def self.format_description(description)
106
106
  # remove leading and trailing whitespace
107
107
  description.strip!
108
- # wrap text after 80 characters
109
- description.gsub!(/(.{1,80})(\s+|\Z)/, "\\1\n")
108
+ # wrap text after 80 characters, assuming we're at one tabstop's (two
109
+ # spaces') level of indentation already
110
+ description.gsub!(/(.{1,78})(\s+|\Z)/, "\\1\n")
110
111
  # add hashtags to lines
111
112
  description = description.split("\n").map { |line| " # #{line}" }.join("\n")
112
113
 
@@ -103,6 +103,7 @@ class Instrumentation < Thor
103
103
  <<-CONFIG
104
104
  :'instrumentation.#{snake_name}' => {
105
105
  :default => 'auto',
106
+ :documentation_default => 'auto'
106
107
  :public => true,
107
108
  :type => String,
108
109
  :dynamic_name => true,