newrelic_rpm 9.3.0 → 9.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.build_ignore +6 -1
  3. data/CHANGELOG.md +43 -0
  4. data/README.md +4 -0
  5. data/lib/new_relic/agent/configuration/default_source.rb +25 -2
  6. data/lib/new_relic/agent/configuration/environment_source.rb +1 -1
  7. data/lib/new_relic/agent/distributed_tracing.rb +1 -1
  8. data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +1 -1
  9. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -2
  10. data/lib/new_relic/agent/instrumentation/memcache.rb +2 -2
  11. data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
  12. data/lib/new_relic/agent/instrumentation/roda/chain.rb +43 -0
  13. data/lib/new_relic/agent/instrumentation/roda/instrumentation.rb +52 -0
  14. data/lib/new_relic/agent/instrumentation/roda/prepend.rb +24 -0
  15. data/lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb +30 -0
  16. data/lib/new_relic/agent/instrumentation/roda.rb +33 -0
  17. data/lib/new_relic/agent/instrumentation/sequel.rb +1 -1
  18. data/lib/new_relic/agent/log_event_attributes.rb +1 -1
  19. data/lib/new_relic/agent/new_relic_service.rb +33 -17
  20. data/lib/new_relic/agent/pipe_service.rb +1 -1
  21. data/lib/new_relic/agent/tracer.rb +4 -3
  22. data/lib/new_relic/agent/transaction/request_attributes.rb +45 -7
  23. data/lib/new_relic/agent/transaction.rb +5 -4
  24. data/lib/new_relic/agent/utilization/vendor.rb +5 -7
  25. data/lib/new_relic/agent.rb +1 -1
  26. data/lib/new_relic/cli/command.rb +1 -0
  27. data/lib/new_relic/control/class_methods.rb +1 -7
  28. data/lib/new_relic/control/frameworks/roda.rb +20 -0
  29. data/lib/new_relic/language_support.rb +5 -0
  30. data/lib/new_relic/noticed_error.rb +5 -2
  31. data/lib/new_relic/rack/browser_monitoring.rb +1 -1
  32. data/lib/new_relic/version.rb +1 -1
  33. data/lib/tasks/bump_version.rake +1 -1
  34. data/lib/tasks/config.rake +3 -2
  35. data/lib/tasks/helpers/config.html.erb +93 -0
  36. data/lib/tasks/helpers/format.rb +11 -7
  37. data/lib/tasks/helpers/version_bump.rb +2 -2
  38. data/lib/tasks/newrelicyml.rake +1 -1
  39. data/newrelic.yml +11 -0
  40. data/newrelic_rpm.gemspec +8 -5
  41. data/test/agent_helper.rb +1027 -0
  42. metadata +26 -8
  43. data/lib/tasks/helpers/removers.rb +0 -33
  44. data/lib/tasks/multiverse.rake +0 -6
  45. data/lib/tasks/multiverse.rb +0 -76
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.3.0
4
+ version: 9.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanna McClure
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-06-26 00:00:00.000000000 Z
14
+ date: 2023-08-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -69,6 +69,20 @@ dependencies:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '1.16'
72
+ - !ruby/object:Gem::Dependency
73
+ name: rack
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
72
86
  - !ruby/object:Gem::Dependency
73
87
  name: rake
74
88
  requirement: !ruby/object:Gem::Requirement
@@ -89,14 +103,14 @@ dependencies:
89
103
  requirements:
90
104
  - - '='
91
105
  - !ruby/object:Gem::Version
92
- version: '1.51'
106
+ version: '1.54'
93
107
  type: :development
94
108
  prerelease: false
95
109
  version_requirements: !ruby/object:Gem::Requirement
96
110
  requirements:
97
111
  - - '='
98
112
  - !ruby/object:Gem::Version
99
- version: '1.51'
113
+ version: '1.54'
100
114
  - !ruby/object:Gem::Dependency
101
115
  name: rubocop-ast
102
116
  requirement: !ruby/object:Gem::Requirement
@@ -440,6 +454,11 @@ files:
440
454
  - lib/new_relic/agent/instrumentation/resque/helper.rb
441
455
  - lib/new_relic/agent/instrumentation/resque/instrumentation.rb
442
456
  - lib/new_relic/agent/instrumentation/resque/prepend.rb
457
+ - lib/new_relic/agent/instrumentation/roda.rb
458
+ - lib/new_relic/agent/instrumentation/roda/chain.rb
459
+ - lib/new_relic/agent/instrumentation/roda/instrumentation.rb
460
+ - lib/new_relic/agent/instrumentation/roda/prepend.rb
461
+ - lib/new_relic/agent/instrumentation/roda/roda_transaction_namer.rb
443
462
  - lib/new_relic/agent/instrumentation/sequel.rb
444
463
  - lib/new_relic/agent/instrumentation/sequel_helper.rb
445
464
  - lib/new_relic/agent/instrumentation/sidekiq.rb
@@ -571,6 +590,7 @@ files:
571
590
  - lib/new_relic/control/frameworks/rails3.rb
572
591
  - lib/new_relic/control/frameworks/rails4.rb
573
592
  - lib/new_relic/control/frameworks/rails_notifications.rb
593
+ - lib/new_relic/control/frameworks/roda.rb
574
594
  - lib/new_relic/control/frameworks/ruby.rb
575
595
  - lib/new_relic/control/frameworks/sinatra.rb
576
596
  - lib/new_relic/control/instance_methods.rb
@@ -611,7 +631,6 @@ files:
611
631
  - lib/tasks/helpers/matches.rb
612
632
  - lib/tasks/helpers/newrelicyml.rb
613
633
  - lib/tasks/helpers/prompt.rb
614
- - lib/tasks/helpers/removers.rb
615
634
  - lib/tasks/helpers/version_bump.rb
616
635
  - lib/tasks/install.rake
617
636
  - lib/tasks/instrumentation_generator/README.md
@@ -627,15 +646,14 @@ files:
627
646
  - lib/tasks/instrumentation_generator/templates/prepend.tt
628
647
  - lib/tasks/instrumentation_generator/templates/prepend_method.tt
629
648
  - lib/tasks/instrumentation_generator/templates/test.tt
630
- - lib/tasks/multiverse.rake
631
- - lib/tasks/multiverse.rb
632
649
  - lib/tasks/newrelic.rb
633
650
  - lib/tasks/newrelicyml.rake
634
651
  - lib/tasks/tests.rake
635
652
  - newrelic.yml
636
653
  - newrelic_rpm.gemspec
637
654
  - recipes/newrelic.rb
638
- homepage: https://github.com/newrelic/rpm
655
+ - test/agent_helper.rb
656
+ homepage: https://github.com/newrelic/newrelic-ruby-agent
639
657
  licenses:
640
658
  - Apache-2.0
641
659
  metadata:
@@ -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,76 +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
- task :prime, [:suite] => [:env] do |_, args|
69
- Multiverse::Runner.prime(args.suite, Multiverse::Runner.parse_args(args))
70
- end
71
-
72
- task :gem_manifest => :env do
73
- Multiverse::GemManifest.new.report
74
- end
75
- end
76
- end