newrelic_rpm 9.2.2 → 9.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +26 -0
  3. data/CHANGELOG.md +70 -0
  4. data/README.md +4 -4
  5. data/lib/new_relic/agent/configuration/default_source.rb +77 -29
  6. data/lib/new_relic/agent/configuration/manager.rb +3 -2
  7. data/lib/new_relic/agent/configuration/yaml_source.rb +13 -0
  8. data/lib/new_relic/agent/distributed_tracing.rb +1 -1
  9. data/lib/new_relic/agent/instrumentation/active_record.rb +1 -1
  10. data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +2 -1
  11. data/lib/new_relic/agent/instrumentation/concurrent_ruby/chain.rb +1 -1
  12. data/lib/new_relic/agent/instrumentation/concurrent_ruby/instrumentation.rb +1 -2
  13. data/lib/new_relic/agent/instrumentation/concurrent_ruby/prepend.rb +1 -1
  14. data/lib/new_relic/agent/instrumentation/fiber/chain.rb +10 -3
  15. data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +1 -2
  16. data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +10 -3
  17. data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +3 -3
  18. data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +1 -1
  19. data/lib/new_relic/agent/instrumentation/thread/chain.rb +1 -1
  20. data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +0 -1
  21. data/lib/new_relic/agent/instrumentation/thread/prepend.rb +1 -1
  22. data/lib/new_relic/agent/log_event_aggregator.rb +49 -2
  23. data/lib/new_relic/agent/log_event_attributes.rb +115 -0
  24. data/lib/new_relic/agent/logging.rb +4 -4
  25. data/lib/new_relic/agent/method_tracer_helpers.rb +26 -5
  26. data/lib/new_relic/agent/tracer.rb +2 -2
  27. data/lib/new_relic/agent.rb +38 -1
  28. data/lib/new_relic/cli/command.rb +1 -0
  29. data/lib/new_relic/dependency_detection.rb +6 -0
  30. data/lib/new_relic/latest_changes.rb +1 -1
  31. data/lib/new_relic/rack/browser_monitoring.rb +1 -1
  32. data/lib/new_relic/supportability_helper.rb +1 -0
  33. data/lib/new_relic/traced_thread.rb +2 -3
  34. data/lib/new_relic/version.rb +2 -2
  35. data/lib/sequel/extensions/new_relic_instrumentation.rb +1 -1
  36. data/lib/tasks/bump_version.rake +21 -0
  37. data/lib/tasks/helpers/newrelicyml.rb +144 -0
  38. data/lib/tasks/helpers/version_bump.rb +62 -0
  39. data/lib/tasks/newrelicyml.rake +13 -0
  40. data/newrelic.yml +307 -266
  41. data/newrelic_rpm.gemspec +10 -7
  42. metadata +13 -25
  43. data/.gitignore +0 -43
  44. data/.project +0 -23
  45. data/.rubocop.yml +0 -1845
  46. data/.rubocop_todo.yml +0 -61
  47. data/.simplecov +0 -16
  48. data/.snyk +0 -11
  49. data/.yardopts +0 -27
  50. data/Brewfile +0 -13
  51. data/DOCKER.md +0 -167
  52. data/Dockerfile +0 -10
  53. data/Guardfile +0 -27
  54. data/config/database.yml +0 -5
  55. data/config.dot +0 -278
  56. data/docker-compose.yml +0 -107
  57. data/lefthook.yml +0 -9
  58. data/lib/tasks/helpers/removers.rb +0 -33
  59. data/lib/tasks/multiverse.rake +0 -6
  60. data/lib/tasks/multiverse.rb +0 -84
data/docker-compose.yml DELETED
@@ -1,107 +0,0 @@
1
- version: "3.9"
2
- services:
3
- elasticsearch7:
4
- image: elasticsearch:7.16.2
5
- ports:
6
- - "9200:9200"
7
- environment:
8
- - discovery.type=single-node
9
- - bootstrap.memory_lock=true
10
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
11
- mem_limit: 1g
12
- elasticsearch8:
13
- image: elasticsearch:8.4.2
14
- ports:
15
- - "9250:9250"
16
- environment:
17
- - discovery.type=single-node
18
- - xpack.security.enabled=false
19
- - http.port=9250
20
- - bootstrap.memory_lock=true
21
- - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
22
- mem_limit: 1g
23
- mysql:
24
- image: mysql:5.7
25
- restart: always
26
- environment:
27
- MYSQL_ROOT_PASSWORD: mysql_root_password
28
- MYSQL_DATABASE: app
29
- expose:
30
- - "3306"
31
- volumes:
32
- - mysql:/var/lib/mysql
33
- rabbitmq:
34
- image: rabbitmq:3.9.12
35
- restart: always
36
- environment:
37
- RABBITMQ_NODENAME: rabbit
38
- expose:
39
- - "5672"
40
- - "15672"
41
- - "25672"
42
- - "4369"
43
- memcached:
44
- image: memcached:1.6.12
45
- restart: always
46
- expose:
47
- - "11211"
48
- mongodb:
49
- image: mongo:5.0.4
50
- restart: always
51
- volumes:
52
- - /data/db
53
- expose:
54
- - "27017"
55
- postgres:
56
- image: postgres:14.2
57
- restart: always
58
- environment:
59
- POSTGRES_USER: admin
60
- POSTGRES_PASSWORD: postgres_password
61
- volumes:
62
- - postgres:/var/lib/postgresql/data
63
- expose:
64
- - "5432"
65
- redis:
66
- image: redis:6.2.6
67
- restart: always
68
- volumes:
69
- - /var/lib/redis
70
- expose:
71
- - "6379"
72
- app:
73
- build:
74
- context: .
75
- args:
76
- - ruby_version=${RUBY_VERSION:-3.1}
77
- image: newrelic_rpm
78
- tty: true
79
- stdin_open: true
80
- environment:
81
- MYSQL_USERNAME: root
82
- MYSQL_PASSWORD: mysql_root_password
83
- DATABASE_NAME: app
84
- MYSQL_HOST: mysql
85
- POSTGRES_USERNAME: admin
86
- POSTGRES_PASSWORD: postgres_password
87
- command: ["irb"]
88
- volumes:
89
- - ".:/usr/src/app"
90
- depends_on:
91
- - elasticsearch7
92
- - elasticsearch8
93
- - mysql
94
- - memcached
95
- - mongodb
96
- - postgres
97
- - rabbitmq
98
- - redis
99
- sysctls:
100
- - "net.ipv6.conf.all.disable_ipv6=0"
101
- volumes:
102
- mongodb:
103
- driver: local
104
- mysql:
105
- driver: local
106
- postgres:
107
- driver: local
data/lefthook.yml DELETED
@@ -1,9 +0,0 @@
1
- # Lefthook (https://github.com/evilmartians/lefthook) is a git hooks manager
2
- # Install it on your machine by running `gem install lefthook`
3
- pre-commit:
4
- parallel: true
5
- commands:
6
- rubocop:
7
- files: git diff --name-only --staged
8
- glob: "*.rb"
9
- run: rubocop --force-exclusion {files}
@@ -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
- module Removers
6
- def remove_local_multiverse_databases
7
- list_databases_command = %(echo "show databases" | mysql -u root)
8
- databases = `#{list_databases_command}`.chomp!.split("\n").select { |s| s.include?('multiverse') }
9
- databases.each do |database|
10
- puts "Dropping #{database}"
11
- `echo "drop database #{database}" | mysql -u root`
12
- end
13
- rescue => error
14
- puts 'ERROR: Cannot get MySQL databases...'
15
- puts error.message
16
- end
17
-
18
- def remove_generated_gemfiles
19
- file_path = File.expand_path('test/multiverse/suites')
20
- Dir.glob(File.join(file_path, '**', 'Gemfile*')).each do |fn|
21
- puts "Removing #{fn.gsub(file_path, '.../suites')}"
22
- FileUtils.rm(fn)
23
- end
24
- end
25
-
26
- def remove_generated_gemfile_lockfiles
27
- file_path = File.expand_path('test/environments')
28
- Dir.glob(File.join(file_path, '**', 'Gemfile.lock')).each do |fn|
29
- puts "Removing #{fn.gsub(file_path, '.../environments')}"
30
- FileUtils.rm(fn)
31
- end
32
- end
33
- end
@@ -1,6 +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
- # Guts of task are in a .rb file to allow requiring from external gems
6
- require "#{File.join(File.dirname(__FILE__))}/multiverse"
@@ -1,84 +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
- #
6
- # Rake task for running Ruby agent multiverse tests. This file may be required
7
- # from third party gems. It is also used by the agent itself to run multiverse.
8
- #
9
- # Multiverse tests are grouped in (potentially multiverse) "suite" directories.
10
- # These suites are found by default under ./test/multiverse. That location can
11
- # be overridden with ENV['SUITES_DIRECTORY'].
12
- #
13
- # The first parameter to this task is a suite directory name to run. If
14
- # excluded, multiverse will run all suites it finds.
15
- #
16
- # Additional parameters are allowed to multiverse. Many parameters can be
17
- # combined.
18
- #
19
- # Some examples:
20
- #
21
- # # Runs ./test/multiverse/*
22
- # bundle exec rake test:multiverse
23
- #
24
- # # Runs ./test/multiverse/my_gem
25
- # bundle exec rake test:multiverse[my_gem]
26
- #
27
- # # With verbose logging and debugging via pry
28
- # bundle exec rake test:multiverse[my_gem,verbose,debug]
29
- #
30
- # # Runs only first set of gems defined in my_gem's Envfile
31
- # bundle exec rake test:multiverse[my_gem,env=0]
32
- #
33
- # # Runs tests matching the passed name (via Minitest's built-in filtering)
34
- # bundle exec rake test:multiverse[my_gem,name=MyGemTest]
35
- #
36
- # # Runs with a specific test seed
37
- # bundle exec rake test:multiverse[my_gem,seed=1337]
38
-
39
- require_relative 'helpers/removers'
40
- include Removers
41
-
42
- namespace :test do
43
- desc 'Run functional test suite for New Relic'
44
- task :multiverse, [:suite, :param1, :param2, :param3, :param4] => ['multiverse:env'] do |_, args|
45
- Multiverse::Runner.run(args.suite, Multiverse::Runner.parse_args(args))
46
- end
47
-
48
- namespace :multiverse do
49
- # task :prerequisites
50
-
51
- task :env do
52
- # ENV['SUITES_DIRECTORY'] = File.expand_path('../../test/multiverse/suites', __FILE__)
53
- require File.expand_path('../../../test/multiverse/lib/multiverse', __FILE__)
54
- end
55
-
56
- task :clobber do
57
- remove_local_multiverse_databases
58
- remove_generated_gemfiles
59
- remove_generated_gemfile_lockfiles
60
- end
61
-
62
- desc 'Clean cached gemfiles from Bundler.bundle_path'
63
- task :clean_gemfile_cache do
64
- glob = File.expand_path('multiverse-cache/Gemfile.*.lock', Bundler.bundle_path)
65
- File.delete(*Dir[glob])
66
- end
67
-
68
- desc 'Test the multiverse testing framework by executing tests in test/multiverse/test. Get meta with it.'
69
- task :self, [:suite, :mode] do |_, args|
70
- args.with_defaults(:suite => '', :mode => '')
71
- puts ('Testing the multiverse testing framework...')
72
- test_files = FileList['test/multiverse/test/*_test.rb']
73
- ruby test_files.join(' ')
74
- end
75
-
76
- task :prime, [:suite] => [:env] do |_, args|
77
- Multiverse::Runner.prime(args.suite, Multiverse::Runner.parse_args(args))
78
- end
79
-
80
- task :gem_manifest => :env do
81
- Multiverse::GemManifest.new.report
82
- end
83
- end
84
- end