newrelic_rpm 3.9.7.266 → 3.9.8.273

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +44 -1
  3. data/lib/new_relic/agent.rb +31 -0
  4. data/lib/new_relic/agent/agent.rb +34 -5
  5. data/lib/new_relic/agent/configuration/default_source.rb +25 -1
  6. data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
  7. data/lib/new_relic/agent/cross_app_monitor.rb +1 -1
  8. data/lib/new_relic/agent/custom_event_aggregator.rb +2 -4
  9. data/lib/new_relic/agent/error_collector.rb +17 -12
  10. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +9 -8
  11. data/lib/new_relic/agent/instrumentation/grape.rb +67 -0
  12. data/lib/new_relic/agent/new_relic_service.rb +93 -43
  13. data/lib/new_relic/agent/pipe_service.rb +4 -0
  14. data/lib/new_relic/agent/synthetics_event_buffer.rb +42 -0
  15. data/lib/new_relic/agent/system_info.rb +44 -18
  16. data/lib/new_relic/agent/transaction_event_aggregator.rb +9 -2
  17. data/lib/new_relic/agent/utilization_data.rb +77 -0
  18. data/lib/new_relic/agent/vm/mri_vm.rb +3 -3
  19. data/lib/new_relic/rack/agent_hooks.rb +15 -15
  20. data/lib/new_relic/recipes/capistrano3.rb +2 -2
  21. data/lib/new_relic/version.rb +1 -1
  22. data/newrelic_rpm.gemspec +0 -1
  23. data/test/agent_helper.rb +13 -3
  24. data/test/environments/lib/environments/runner.rb +3 -19
  25. data/test/environments/rails42/Gemfile +5 -1
  26. data/test/fixtures/cross_agent_tests/README.md +1 -1
  27. data/test/fixtures/cross_agent_tests/cat_map.json +154 -88
  28. data/test/fixtures/cross_agent_tests/docker_container_id/cases.json +30 -6
  29. data/test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-lxc-driver.txt +10 -0
  30. data/test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-native-driver-fs.txt +10 -0
  31. data/test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-native-driver-systemd.txt +10 -0
  32. data/test/fixtures/cross_agent_tests/docker_container_id/heroku.txt +1 -0
  33. data/test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-lxc-container.txt +10 -0
  34. data/test/fixtures/cross_agent_tests/docker_container_id/{lxc-containers-without-docker.txt → ubuntu-14.04-no-container.txt} +0 -0
  35. data/test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.10-no-container.txt +10 -0
  36. data/test/multiverse/lib/multiverse/runner.rb +1 -0
  37. data/test/multiverse/lib/multiverse/suite.rb +6 -2
  38. data/test/multiverse/suites/active_record/.gitignore +1 -0
  39. data/test/multiverse/suites/active_record/Envfile +25 -7
  40. data/test/multiverse/suites/active_record/Rakefile +9 -0
  41. data/test/{new_relic/agent/instrumentation → multiverse/suites/active_record}/active_record_test.rb +82 -88
  42. data/test/multiverse/suites/active_record/app/models/models.rb +27 -0
  43. data/test/multiverse/suites/active_record/ar_method_aliasing.rb +5 -46
  44. data/test/multiverse/suites/active_record/before_suite.rb +23 -0
  45. data/test/multiverse/suites/active_record/config/database.rb +79 -0
  46. data/test/multiverse/suites/active_record/config/database.yml +19 -0
  47. data/test/multiverse/suites/active_record/db/migrate/20141105131800_create_users_and_aliases.rb +21 -0
  48. data/test/multiverse/suites/active_record/db/migrate/20141106082200_create_orders_and_shipments.rb +25 -0
  49. data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +4 -1
  50. data/test/multiverse/suites/agent_only/custom_analytics_events_test.rb +53 -0
  51. data/test/multiverse/suites/agent_only/keepalive_test.rb +3 -7
  52. data/test/multiverse/suites/agent_only/utilization_data_collection_test.rb +170 -0
  53. data/test/multiverse/suites/grape/Envfile +15 -0
  54. data/test/multiverse/suites/grape/config/newrelic.yml +18 -0
  55. data/test/multiverse/suites/grape/grape_test.rb +60 -0
  56. data/test/multiverse/suites/grape/grape_test_api.rb +43 -0
  57. data/test/multiverse/suites/grape/unsupported_version_test.rb +31 -0
  58. data/test/multiverse/suites/json/Envfile +3 -1
  59. data/test/multiverse/suites/rack/rack_env_mutation_test.rb +54 -0
  60. data/test/multiverse/suites/rails/Envfile +1 -1
  61. data/test/multiverse/suites/rails/view_instrumentation_test.rb +2 -1
  62. data/test/multiverse/suites/resque/resque_marshalling_test.rb +54 -0
  63. data/test/multiverse/suites/typhoeus/Envfile +4 -4
  64. data/test/new_relic/agent/agent_test.rb +37 -0
  65. data/test/new_relic/agent/configuration/default_source_test.rb +14 -0
  66. data/test/new_relic/agent/custom_event_aggregator_test.rb +3 -3
  67. data/test/new_relic/agent/error_collector/notice_error_test.rb +4 -4
  68. data/test/new_relic/agent/error_collector_test.rb +27 -4
  69. data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +23 -0
  70. data/test/new_relic/agent/new_relic_service_test.rb +208 -103
  71. data/test/new_relic/agent/pipe_service_test.rb +7 -0
  72. data/test/new_relic/agent/synthetics_event_buffer_test.rb +54 -0
  73. data/test/new_relic/agent/synthetics_monitor_test.rb +0 -3
  74. data/test/new_relic/agent/system_info_test.rb +6 -6
  75. data/test/new_relic/agent/transaction_event_aggregator_test.rb +43 -2
  76. data/test/new_relic/agent/utilization_data_test.rb +18 -0
  77. data/test/new_relic/collection_helper_test.rb +0 -1
  78. data/test/new_relic/data_container_tests.rb +11 -7
  79. data/test/new_relic/fake_collector.rb +23 -0
  80. data/test/new_relic/fake_instance_metadata_service.rb +45 -0
  81. data/test/new_relic/license_test.rb +2 -0
  82. data/test/new_relic/marshalling_test_cases.rb +89 -4
  83. data/test/new_relic/transaction_sample_test.rb +1 -0
  84. data/test/test_helper.rb +1 -0
  85. metadata +33 -6
  86. metadata.gz.sig +1 -2
  87. data/test/active_record_fixtures.rb +0 -79
  88. data/test/new_relic/rack/all_test.rb +0 -14
@@ -3,6 +3,7 @@
3
3
  # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
4
 
5
5
  require File.expand_path('../../test_helper.rb', __FILE__)
6
+ require 'new_relic/rack/developer_mode'
6
7
 
7
8
  class NewRelic::TransactionSampleTest < Minitest::Test
8
9
  include TransactionSampleTestHelper
@@ -110,6 +110,7 @@ def default_service(stubbed_method_overrides = {})
110
110
  :get_agent_commands => [],
111
111
  :agent_command_results => nil,
112
112
  :analytic_event_data => nil,
113
+ :utilization_data => nil,
113
114
  :valid_to_marshal? => true
114
115
  }
115
116
 
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: 3.9.7.266
4
+ version: 3.9.8.273
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -41,7 +41,7 @@ cert_chain:
41
41
  K0ZZTXduQWIrVm1OT2h2MVMrc0poYmpaMzBQS2d6NnZMaFQ2dW5pZUNqTGs5
42
42
  d0dHbWxTSwpZamJudkE5cXJhTExhalNqCi0tLS0tRU5EIENFUlRJRklDQVRF
43
43
  LS0tLS0K
44
- date: 2014-11-14 00:00:00.000000000 Z
44
+ date: 2014-12-02 00:00:00.000000000 Z
45
45
  dependencies:
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rake
@@ -335,6 +335,7 @@ files:
335
335
  - lib/new_relic/agent/instrumentation/excon.rb
336
336
  - lib/new_relic/agent/instrumentation/excon/connection.rb
337
337
  - lib/new_relic/agent/instrumentation/excon/middleware.rb
338
+ - lib/new_relic/agent/instrumentation/grape.rb
338
339
  - lib/new_relic/agent/instrumentation/httpclient.rb
339
340
  - lib/new_relic/agent/instrumentation/ignore_actions.rb
340
341
  - lib/new_relic/agent/instrumentation/memcache.rb
@@ -403,6 +404,7 @@ files:
403
404
  - lib/new_relic/agent/stats_engine/samplers.rb
404
405
  - lib/new_relic/agent/stats_engine/stats_hash.rb
405
406
  - lib/new_relic/agent/supported_versions.rb
407
+ - lib/new_relic/agent/synthetics_event_buffer.rb
406
408
  - lib/new_relic/agent/synthetics_monitor.rb
407
409
  - lib/new_relic/agent/system_info.rb
408
410
  - lib/new_relic/agent/threading/agent_thread.rb
@@ -423,6 +425,7 @@ files:
423
425
  - lib/new_relic/agent/transaction_sampler.rb
424
426
  - lib/new_relic/agent/transaction_state.rb
425
427
  - lib/new_relic/agent/transaction_timings.rb
428
+ - lib/new_relic/agent/utilization_data.rb
426
429
  - lib/new_relic/agent/vm.rb
427
430
  - lib/new_relic/agent/vm/jruby_vm.rb
428
431
  - lib/new_relic/agent/vm/monotonic_gc_profiler.rb
@@ -495,7 +498,6 @@ files:
495
498
  - newrelic.yml
496
499
  - newrelic_rpm.gemspec
497
500
  - recipes/newrelic.rb
498
- - test/active_record_fixtures.rb
499
501
  - test/agent_helper.rb
500
502
  - test/config/newrelic.yml
501
503
  - test/config/test.cert.crt
@@ -589,9 +591,15 @@ files:
589
591
  - test/fixtures/cross_agent_tests/docker_container_id/cases.json
590
592
  - test/fixtures/cross_agent_tests/docker_container_id/docker-0.9.1.txt
591
593
  - test/fixtures/cross_agent_tests/docker_container_id/docker-1.0.0.txt
594
+ - test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-lxc-driver.txt
595
+ - test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-native-driver-fs.txt
596
+ - test/fixtures/cross_agent_tests/docker_container_id/docker-1.1.2-native-driver-systemd.txt
592
597
  - test/fixtures/cross_agent_tests/docker_container_id/docker-1.3.txt
593
598
  - test/fixtures/cross_agent_tests/docker_container_id/empty.txt
594
- - test/fixtures/cross_agent_tests/docker_container_id/lxc-containers-without-docker.txt
599
+ - test/fixtures/cross_agent_tests/docker_container_id/heroku.txt
600
+ - test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-lxc-container.txt
601
+ - test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.04-no-container.txt
602
+ - test/fixtures/cross_agent_tests/docker_container_id/ubuntu-14.10-no-container.txt
595
603
  - test/fixtures/cross_agent_tests/labels.json
596
604
  - test/fixtures/cross_agent_tests/postgres_explain_obfuscation/README.md
597
605
  - test/fixtures/cross_agent_tests/postgres_explain_obfuscation/basic_where.colon_obfuscated.txt
@@ -808,9 +816,18 @@ files:
808
816
  - test/multiverse/lib/multiverse/runner.rb
809
817
  - test/multiverse/lib/multiverse/suite.rb
810
818
  - test/multiverse/script/runner
819
+ - test/multiverse/suites/active_record/.gitignore
811
820
  - test/multiverse/suites/active_record/Envfile
821
+ - test/multiverse/suites/active_record/Rakefile
822
+ - test/multiverse/suites/active_record/active_record_test.rb
823
+ - test/multiverse/suites/active_record/app/models/models.rb
812
824
  - test/multiverse/suites/active_record/ar_method_aliasing.rb
825
+ - test/multiverse/suites/active_record/before_suite.rb
826
+ - test/multiverse/suites/active_record/config/database.rb
827
+ - test/multiverse/suites/active_record/config/database.yml
813
828
  - test/multiverse/suites/active_record/config/newrelic.yml
829
+ - test/multiverse/suites/active_record/db/migrate/20141105131800_create_users_and_aliases.rb
830
+ - test/multiverse/suites/active_record/db/migrate/20141106082200_create_orders_and_shipments.rb
814
831
  - test/multiverse/suites/activemerchant/Envfile
815
832
  - test/multiverse/suites/activemerchant/activemerchant_test.rb
816
833
  - test/multiverse/suites/agent_only/Envfile
@@ -819,6 +836,7 @@ files:
819
836
  - test/multiverse/suites/agent_only/collector_exception_handling_test.rb
820
837
  - test/multiverse/suites/agent_only/config/newrelic.yml
821
838
  - test/multiverse/suites/agent_only/cross_application_tracing_test.rb
839
+ - test/multiverse/suites/agent_only/custom_analytics_events_test.rb
822
840
  - test/multiverse/suites/agent_only/custom_queue_time_test.rb
823
841
  - test/multiverse/suites/agent_only/encoding_handling_test.rb
824
842
  - test/multiverse/suites/agent_only/exclusive_time_test.rb
@@ -841,6 +859,7 @@ files:
841
859
  - test/multiverse/suites/agent_only/testing_app.rb
842
860
  - test/multiverse/suites/agent_only/thread_profiling_test.rb
843
861
  - test/multiverse/suites/agent_only/transaction_ignoring_test.rb
862
+ - test/multiverse/suites/agent_only/utilization_data_collection_test.rb
844
863
  - test/multiverse/suites/agent_only/xray_sessions_test.rb
845
864
  - test/multiverse/suites/bare/Envfile
846
865
  - test/multiverse/suites/bare/standalone_instrumentation_test.rb
@@ -874,6 +893,11 @@ files:
874
893
  - test/multiverse/suites/excon/Envfile
875
894
  - test/multiverse/suites/excon/config/newrelic.yml
876
895
  - test/multiverse/suites/excon/excon_test.rb
896
+ - test/multiverse/suites/grape/Envfile
897
+ - test/multiverse/suites/grape/config/newrelic.yml
898
+ - test/multiverse/suites/grape/grape_test.rb
899
+ - test/multiverse/suites/grape/grape_test_api.rb
900
+ - test/multiverse/suites/grape/unsupported_version_test.rb
877
901
  - test/multiverse/suites/high_security/Envfile
878
902
  - test/multiverse/suites/high_security/config/newrelic.yml
879
903
  - test/multiverse/suites/high_security/high_security_test.rb
@@ -907,6 +931,7 @@ files:
907
931
  - test/multiverse/suites/rack/http_response_code_test.rb
908
932
  - test/multiverse/suites/rack/nested_non_rack_app_test.rb
909
933
  - test/multiverse/suites/rack/rack_auto_instrumentation_test.rb
934
+ - test/multiverse/suites/rack/rack_env_mutation_test.rb
910
935
  - test/multiverse/suites/rack/rack_unsupported_version_test.rb
911
936
  - test/multiverse/suites/rack/url_map_test.rb
912
937
  - test/multiverse/suites/rails/Envfile
@@ -947,6 +972,7 @@ files:
947
972
  - test/multiverse/suites/resque/Rakefile
948
973
  - test/multiverse/suites/resque/config/newrelic.yml
949
974
  - test/multiverse/suites/resque/instrumentation_test.rb
975
+ - test/multiverse/suites/resque/resque_marshalling_test.rb
950
976
  - test/multiverse/suites/sequel/Envfile
951
977
  - test/multiverse/suites/sequel/config/newrelic.yml
952
978
  - test/multiverse/suites/sequel/database.rb
@@ -1037,7 +1063,6 @@ files:
1037
1063
  - test/new_relic/agent/instrumentation/active_job_test.rb
1038
1064
  - test/new_relic/agent/instrumentation/active_record_helper_test.rb
1039
1065
  - test/new_relic/agent/instrumentation/active_record_subscriber_test.rb
1040
- - test/new_relic/agent/instrumentation/active_record_test.rb
1041
1066
  - test/new_relic/agent/instrumentation/controller_instrumentation_test.rb
1042
1067
  - test/new_relic/agent/instrumentation/instrumentation_test.rb
1043
1068
  - test/new_relic/agent/instrumentation/metric_frame_test.rb
@@ -1078,6 +1103,7 @@ files:
1078
1103
  - test/new_relic/agent/stats_engine/stats_hash_test.rb
1079
1104
  - test/new_relic/agent/stats_engine_test.rb
1080
1105
  - test/new_relic/agent/stats_test.rb
1106
+ - test/new_relic/agent/synthetics_event_buffer_test.rb
1081
1107
  - test/new_relic/agent/synthetics_monitor_test.rb
1082
1108
  - test/new_relic/agent/system_info_test.rb
1083
1109
  - test/new_relic/agent/threading/agent_thread_test.rb
@@ -1100,6 +1126,7 @@ files:
1100
1126
  - test/new_relic/agent/transaction_state_test.rb
1101
1127
  - test/new_relic/agent/transaction_test.rb
1102
1128
  - test/new_relic/agent/transaction_timings_test.rb
1129
+ - test/new_relic/agent/utilization_data_test.rb
1103
1130
  - test/new_relic/agent/vm/monotonic_gc_profiler_test.rb
1104
1131
  - test/new_relic/agent/vm/mri_vm_test.rb
1105
1132
  - test/new_relic/agent/vm/rubinius_vm_test.rb
@@ -1122,6 +1149,7 @@ files:
1122
1149
  - test/new_relic/evil_server.rb
1123
1150
  - test/new_relic/fake_collector.rb
1124
1151
  - test/new_relic/fake_external_server.rb
1152
+ - test/new_relic/fake_instance_metadata_service.rb
1125
1153
  - test/new_relic/fake_rpm_site.rb
1126
1154
  - test/new_relic/fake_server.rb
1127
1155
  - test/new_relic/framework_test.rb
@@ -1140,7 +1168,6 @@ files:
1140
1168
  - test/new_relic/noticed_error_test.rb
1141
1169
  - test/new_relic/rack/agent_hooks_test.rb
1142
1170
  - test/new_relic/rack/agent_middleware_test.rb
1143
- - test/new_relic/rack/all_test.rb
1144
1171
  - test/new_relic/rack/browser_monitoring_test.rb
1145
1172
  - test/new_relic/rack/deferred_instrumentation_test.rb
1146
1173
  - test/new_relic/rack/developer_mode_helper_test.rb
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ���*2`7lm3"Yt�/��4&��Ijn+�*=4ׇ��Ne|)�Y���Z������.;i
2
- � 1��^İ�͵w�Qaب��e��Z����y��D
1
+ `�E�.|��:s�c�j��l��G�)J�̡}b�M>�@U�2Q�L�6�:AE�ۂ���rc�ؓ�t��kgM�R\a��۟u) ����3�S#��+�7�Tmz���XX�+�A󷆅ŚÏ?03�Y(���t�=�� �9�+�]2�flO#��4�k/_^}�C�Ɩ;������^�1!�wg">)��Ā ˶���f�^�璯Ða��LM�`EcI���a1o~�R�q)C���#�!R$>����/�22-/�ltŐ��ǒ�C
@@ -1,79 +0,0 @@
1
- # encoding: utf-8
2
- # This file is distributed under New Relic's license terms.
3
- # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
-
5
- # Some test models
6
- # These will get created and dropped during the active record tests
7
- # Be sure and call setup and teardown
8
- module ActiveRecordFixtures
9
- extend self
10
- def setup
11
- ActiveRecordFixtures::Order.setup
12
- ActiveRecordFixtures::Shipment.setup
13
- end
14
- def teardown
15
- ActiveRecordFixtures::Shipment.teardown
16
- ActiveRecordFixtures::Order.teardown
17
- begin
18
- super
19
- rescue
20
- end
21
- end
22
-
23
- class Order < ActiveRecord::Base
24
- self.table_name = 'newrelic_test_orders'
25
- has_and_belongs_to_many :shipments, :class_name => 'ActiveRecordFixtures::Shipment',
26
- :join_table => 'orders_shipments'
27
-
28
- def self.setup
29
- unless check_for_table
30
- connection.create_table self.table_name, :force => true do |t|
31
- t.column :name, :string
32
- end
33
- else
34
- connection.execute("delete from #{self.table_name}")
35
- end
36
- end
37
-
38
- def self.check_for_table
39
- connection.table_exists?(self.table_name)
40
- rescue
41
- false
42
- end
43
-
44
- def self.teardown
45
- def connection.log_info *args
46
- super(*args)
47
- end
48
- end
49
- end
50
-
51
- class Shipment < ActiveRecord::Base
52
- self.table_name = 'newrelic_test_shipment'
53
- has_and_belongs_to_many :orders, :class_name => 'ActiveRecordFixtures::Order',
54
- :join_table => 'orders_shipments'
55
-
56
- def self.setup
57
- unless check_for_table
58
- connection.create_table self.table_name, :force => true do |t|
59
- # no other columns
60
- end
61
- connection.create_table 'orders_shipments', :force => true, :id => false do |t|
62
- t.column :order_id, :integer
63
- t.column :shipment_id, :integer
64
- end
65
- else
66
- connection.execute("delete from #{self.table_name}")
67
- end
68
- end
69
- def self.check_for_table
70
- connection.table_exists?(self.table_name) && connection.table_exists?('orders_shipments')
71
- rescue
72
- false
73
- end
74
-
75
-
76
- def self.teardown
77
- end
78
- end
79
- end
@@ -1,14 +0,0 @@
1
- # encoding: utf-8
2
- # This file is distributed under New Relic's license terms.
3
- # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
-
5
- require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
6
- require 'new_relic/rack/browser_monitoring'
7
- require 'new_relic/rack/developer_mode'
8
- class NewRelic::Rack::AllTest < Minitest::Test
9
- # just here to load the files above
10
-
11
- def test_truth
12
- assert true
13
- end
14
- end