newrelic_rpm 3.9.1.236 → 3.9.2.239

Sign up to get free protection for your applications and to get access to all the features.
Files changed (220) hide show
  1. data.tar.gz.sig +2 -4
  2. data/CHANGELOG +96 -2
  3. data/lib/new_relic/agent.rb +47 -4
  4. data/lib/new_relic/agent/agent.rb +51 -26
  5. data/lib/new_relic/agent/agent_logger.rb +4 -0
  6. data/lib/new_relic/agent/configuration.rb +2 -32
  7. data/lib/new_relic/agent/configuration/default_source.rb +153 -118
  8. data/lib/new_relic/agent/configuration/dotted_hash.rb +52 -0
  9. data/lib/new_relic/agent/configuration/environment_source.rb +1 -1
  10. data/lib/new_relic/agent/configuration/manager.rb +101 -2
  11. data/lib/new_relic/agent/configuration/manual_source.rb +17 -0
  12. data/lib/new_relic/agent/configuration/server_source.rb +12 -4
  13. data/lib/new_relic/agent/configuration/yaml_source.rb +46 -22
  14. data/lib/new_relic/agent/cross_app_monitor.rb +1 -1
  15. data/lib/new_relic/agent/cross_app_tracing.rb +1 -1
  16. data/lib/new_relic/agent/database/obfuscation_helpers.rb +55 -14
  17. data/lib/new_relic/agent/database/obfuscator.rb +22 -7
  18. data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +6 -8
  19. data/lib/new_relic/agent/error_collector.rb +24 -16
  20. data/lib/new_relic/agent/event_loop.rb +189 -0
  21. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +8 -17
  22. data/lib/new_relic/agent/instrumentation/active_record_helper.rb +1 -1
  23. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +1 -1
  24. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +17 -16
  25. data/lib/new_relic/agent/instrumentation/ignore_actions.rb +41 -0
  26. data/lib/new_relic/agent/instrumentation/merb/controller.rb +0 -11
  27. data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +1 -1
  28. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +0 -8
  29. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +1 -9
  30. data/lib/new_relic/agent/instrumentation/rails4/action_controller.rb +0 -18
  31. data/lib/new_relic/agent/instrumentation/rubyprof.rb +1 -1
  32. data/lib/new_relic/agent/instrumentation/sidekiq.rb +1 -1
  33. data/lib/new_relic/agent/instrumentation/sinatra.rb +12 -1
  34. data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +1 -1
  35. data/lib/new_relic/agent/method_tracer.rb +33 -39
  36. data/lib/new_relic/agent/new_relic_service.rb +35 -156
  37. data/lib/new_relic/agent/new_relic_service/encoders.rb +34 -0
  38. data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +50 -0
  39. data/lib/new_relic/agent/new_relic_service/marshaller.rb +52 -0
  40. data/lib/new_relic/agent/new_relic_service/pruby_marshaller.rb +52 -0
  41. data/lib/new_relic/agent/threading/backtrace_node.rb +1 -1
  42. data/lib/new_relic/agent/traced_method_stack.rb +16 -2
  43. data/lib/new_relic/agent/transaction.rb +0 -4
  44. data/lib/new_relic/collection_helper.rb +2 -2
  45. data/lib/new_relic/control/frameworks/rails.rb +3 -0
  46. data/lib/new_relic/control/instrumentation.rb +6 -2
  47. data/lib/new_relic/json_wrapper.rb +47 -25
  48. data/lib/new_relic/language_support.rb +0 -4
  49. data/lib/new_relic/latest_changes.rb +2 -2
  50. data/lib/new_relic/rack/developer_mode.rb +4 -3
  51. data/lib/new_relic/recipes/capistrano3.rb +2 -2
  52. data/lib/new_relic/recipes/capistrano_legacy.rb +1 -1
  53. data/lib/new_relic/timer_lib.rb +1 -1
  54. data/lib/new_relic/version.rb +2 -2
  55. data/lib/tasks/config.html.erb +28 -0
  56. data/lib/tasks/config.rake +134 -0
  57. data/lib/tasks/config.text.erb +7 -0
  58. data/lib/tasks/install.rake +0 -63
  59. data/newrelic.yml +7 -0
  60. data/test/active_record_fixtures.rb +4 -4
  61. data/test/agent_helper.rb +58 -18
  62. data/test/environments/lib/environments/runner.rb +1 -1
  63. data/test/environments/rails21/Gemfile +1 -1
  64. data/test/environments/rails21/config/boot.rb +1 -1
  65. data/test/environments/rails22/Gemfile +1 -1
  66. data/test/environments/rails22/config/boot.rb +1 -1
  67. data/test/environments/rails23/config/boot.rb +2 -2
  68. data/test/environments/rails30/Gemfile +1 -1
  69. data/test/environments/rails31/Gemfile +1 -1
  70. data/test/environments/rails32/Gemfile +1 -1
  71. data/test/environments/rails40/Gemfile +1 -1
  72. data/test/environments/rails41/Gemfile +1 -1
  73. data/test/fixtures/cross_agent_tests/labels.json +104 -0
  74. data/test/fixtures/cross_agent_tests/sql_obfuscation/README.md +23 -0
  75. data/test/fixtures/cross_agent_tests/sql_obfuscation/back_quoted_identifiers.mysql.obfuscated +1 -0
  76. data/test/fixtures/cross_agent_tests/sql_obfuscation/back_quoted_identifiers.mysql.sql +1 -0
  77. data/test/fixtures/cross_agent_tests/sql_obfuscation/comment_delimiters_in_strings.obfuscated +1 -0
  78. data/test/fixtures/cross_agent_tests/sql_obfuscation/comment_delimiters_in_strings.sql +1 -0
  79. data/test/fixtures/cross_agent_tests/sql_obfuscation/double_quoted_identifiers.postgres.obfuscated +1 -0
  80. data/test/fixtures/cross_agent_tests/sql_obfuscation/double_quoted_identifiers.postgres.sql +1 -0
  81. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_line_comment_in_string.obfuscated +2 -0
  82. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_line_comment_in_string.sql +2 -0
  83. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_line_comments_with_quotes.obfuscated +1 -0
  84. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_line_comments_with_quotes.sql +2 -0
  85. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_cstyle.obfuscated +1 -0
  86. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_cstyle.sql +1 -0
  87. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_doubledash.obfuscated +2 -0
  88. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_doubledash.sql +2 -0
  89. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_hash.obfuscated +1 -0
  90. data/test/fixtures/cross_agent_tests/sql_obfuscation/end_of_query_comment_hash.sql +1 -0
  91. data/test/fixtures/cross_agent_tests/sql_obfuscation/escape_string_constants.postgres.obfuscated +1 -0
  92. data/test/fixtures/cross_agent_tests/sql_obfuscation/escape_string_constants.postgres.sql +4 -0
  93. data/test/fixtures/cross_agent_tests/sql_obfuscation/malformed/unterminated_double_quoted_string.mysql.sql +1 -0
  94. data/test/fixtures/cross_agent_tests/sql_obfuscation/malformed/unterminated_single_quoted_string.sql +1 -0
  95. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_comments_and_quotes.obfuscated +1 -0
  96. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_comments_and_quotes.sql +2 -0
  97. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_quotes_comments_and_newlines.obfuscated +1 -0
  98. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_quotes_comments_and_newlines.sql +4 -0
  99. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_quotes_end_of_line_comments.obfuscated +1 -0
  100. data/test/fixtures/cross_agent_tests/sql_obfuscation/mixed_quotes_end_of_line_comments.sql +3 -0
  101. data/test/fixtures/cross_agent_tests/sql_obfuscation/multiple_literal_types.mysql.obfuscated +1 -0
  102. data/test/fixtures/cross_agent_tests/sql_obfuscation/multiple_literal_types.mysql.sql +1 -0
  103. data/test/fixtures/cross_agent_tests/sql_obfuscation/numbers_in_identifiers.obfuscated +1 -0
  104. data/test/fixtures/cross_agent_tests/sql_obfuscation/numbers_in_identifiers.sql +1 -0
  105. data/test/fixtures/cross_agent_tests/sql_obfuscation/numeric_literals.obfuscated +1 -0
  106. data/test/fixtures/cross_agent_tests/sql_obfuscation/numeric_literals.sql +1 -0
  107. data/test/fixtures/cross_agent_tests/sql_obfuscation/quote_delimiters_in_comments.obfuscated +1 -0
  108. data/test/fixtures/cross_agent_tests/sql_obfuscation/quote_delimiters_in_comments.sql +1 -0
  109. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_double_quoted.mysql.obfuscated +1 -0
  110. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_double_quoted.mysql.sql +1 -0
  111. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_single_quoted.obfuscated +1 -0
  112. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_single_quoted.sql +1 -0
  113. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_backslash_and_twin_single_quotes.obfuscated +1 -0
  114. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_backslash_and_twin_single_quotes.sql +4 -0
  115. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_double_quote.obfuscated +1 -0
  116. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_double_quote.sql +1 -0
  117. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_newline.obfuscated +1 -0
  118. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_newline.sql +2 -0
  119. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_single_quote.mysql.obfuscated +1 -0
  120. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_embedded_single_quote.mysql.sql +1 -0
  121. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_escaped_quotes.mysql.obfuscated +1 -0
  122. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_escaped_quotes.mysql.sql +1 -0
  123. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_backslash.obfuscated +1 -0
  124. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_backslash.sql +4 -0
  125. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_backslash.mysql.obfuscated +1 -0
  126. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_backslash.mysql.sql +1 -0
  127. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_backslash_single_quoted.obfuscated +1 -0
  128. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_backslash_single_quoted.sql +1 -0
  129. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_quote.obfuscated +1 -0
  130. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_trailing_escaped_quote.sql +1 -0
  131. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_twin_single_quotes.obfuscated +1 -0
  132. data/test/fixtures/cross_agent_tests/sql_obfuscation/string_with_twin_single_quotes.sql +1 -0
  133. data/test/multiverse/lib/multiverse/output_collector.rb +1 -1
  134. data/test/multiverse/lib/multiverse/runner.rb +1 -1
  135. data/test/multiverse/lib/multiverse/suite.rb +19 -4
  136. data/test/multiverse/suites/agent_only/audit_log_test.rb +1 -38
  137. data/test/multiverse/suites/agent_only/collector_exception_handling_test.rb +25 -35
  138. data/test/multiverse/suites/agent_only/config/newrelic.yml +2 -0
  139. data/test/multiverse/suites/agent_only/encoding_handling_test.rb +1 -0
  140. data/test/multiverse/suites/agent_only/harvest_timestamps_test.rb +1 -1
  141. data/test/multiverse/suites/agent_only/keepalive_test.rb +29 -0
  142. data/test/multiverse/suites/agent_only/labels_test.rb +89 -0
  143. data/test/multiverse/suites/agent_only/marshaling_test.rb +1 -3
  144. data/test/multiverse/suites/agent_only/service_timeout_test.rb +1 -1
  145. data/test/multiverse/suites/agent_only/start_up_test.rb +9 -1
  146. data/test/multiverse/suites/capistrano/config/deploy.rb +6 -2
  147. data/test/multiverse/suites/capistrano/deployment_test.rb +12 -4
  148. data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +29 -1
  149. data/test/multiverse/suites/curb/Envfile +6 -2
  150. data/test/multiverse/suites/datamapper/Envfile +0 -4
  151. data/test/multiverse/suites/deferred_instrumentation/Envfile +0 -4
  152. data/test/multiverse/suites/deferred_instrumentation/sinatra_test.rb +1 -1
  153. data/test/multiverse/suites/excon/Envfile +5 -4
  154. data/test/multiverse/suites/excon/excon_test.rb +1 -1
  155. data/test/multiverse/suites/httpclient/Envfile +0 -4
  156. data/test/multiverse/suites/marshalling/Envfile +12 -0
  157. data/test/multiverse/suites/marshalling/config/newrelic.yml +20 -0
  158. data/test/multiverse/suites/marshalling/marshalling_test.rb +60 -0
  159. data/test/multiverse/suites/mongo/helpers/mongo_operation_tests.rb +1 -1
  160. data/test/multiverse/suites/mongo/helpers/mongo_replica_set.rb +1 -1
  161. data/test/multiverse/suites/mongo/helpers/mongo_server.rb +4 -4
  162. data/test/multiverse/suites/padrino/Envfile +0 -5
  163. data/test/multiverse/suites/padrino/padrino_test.rb +1 -1
  164. data/test/multiverse/suites/rack/rack_auto_instrumentation_test.rb +1 -1
  165. data/test/multiverse/suites/rails/gc_instrumentation_test.rb +2 -1
  166. data/test/multiverse/suites/rails/ignore_test.rb +22 -0
  167. data/test/multiverse/suites/rails/rails2_app/config/boot.rb +2 -2
  168. data/test/multiverse/suites/rails/rails2_app/config/routes.rb +1 -0
  169. data/test/multiverse/suites/resque/Envfile +0 -4
  170. data/test/multiverse/suites/sequel/Envfile +0 -5
  171. data/test/multiverse/suites/sinatra/sinatra_classic_test.rb +1 -1
  172. data/test/multiverse/suites/sinatra/sinatra_modular_test.rb +1 -1
  173. data/test/multiverse/suites/sinatra/sinatra_test_cases.rb +22 -0
  174. data/test/multiverse/suites/typhoeus/Envfile +1 -4
  175. data/test/new_relic/agent/agent/start_worker_thread_test.rb +1 -13
  176. data/test/new_relic/agent/agent_logger_test.rb +11 -0
  177. data/test/new_relic/agent/agent_test.rb +43 -20
  178. data/test/new_relic/agent/audit_logger_test.rb +7 -3
  179. data/test/new_relic/agent/commands/thread_profiler_session_test.rb +0 -1
  180. data/test/new_relic/agent/commands/xray_session_collection_test.rb +1 -1
  181. data/test/new_relic/agent/configuration/dotted_hash_test.rb +53 -0
  182. data/test/new_relic/agent/configuration/manager_test.rb +99 -6
  183. data/test/new_relic/agent/configuration/manual_source_test.rb +18 -0
  184. data/test/new_relic/agent/configuration/orphan_configuration_test.rb +1 -1
  185. data/test/new_relic/agent/configuration/yaml_source_test.rb +8 -4
  186. data/test/new_relic/agent/database/sql_obfuscation_test.rb +76 -0
  187. data/test/new_relic/agent/database_test.rb +2 -38
  188. data/test/new_relic/agent/error_collector/notice_error_test.rb +21 -3
  189. data/test/new_relic/agent/error_collector_test.rb +15 -2
  190. data/test/new_relic/agent/event_loop_test.rb +202 -0
  191. data/test/new_relic/agent/instrumentation/active_record_helper_test.rb +4 -0
  192. data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +283 -182
  193. data/test/new_relic/agent/method_tracer_test.rb +1 -2
  194. data/test/new_relic/agent/new_relic_service_test.rb +83 -27
  195. data/test/new_relic/agent/pipe_channel_manager_test.rb +6 -6
  196. data/test/new_relic/agent/rpm_agent_test.rb +1 -8
  197. data/test/new_relic/agent/sql_sampler_test.rb +10 -8
  198. data/test/new_relic/agent/threading/backtrace_service_test.rb +1 -1
  199. data/test/new_relic/agent/traced_method_stack_test.rb +45 -13
  200. data/test/new_relic/agent/transaction_sample_builder_test.rb +1 -2
  201. data/test/new_relic/agent/transaction_test.rb +3 -3
  202. data/test/new_relic/agent_test.rb +47 -8
  203. data/test/new_relic/collection_helper_test.rb +5 -5
  204. data/test/new_relic/control/instrumentation_test.rb +56 -0
  205. data/test/new_relic/control_test.rb +4 -3
  206. data/test/new_relic/fake_collector.rb +7 -2
  207. data/test/new_relic/http_client_test_cases.rb +4 -4
  208. data/test/new_relic/latest_changes_test.rb +3 -3
  209. data/test/new_relic/transaction_sample/segment_test.rb +0 -1
  210. data/test/new_relic/transaction_sample_test.rb +19 -2
  211. data/test/performance/lib/performance/runner.rb +4 -4
  212. data/test/performance/suites/marshalling.rb +46 -30
  213. data/test/performance/suites/sql_obfuscation.rb +30 -0
  214. data/test/test_helper.rb +1 -1
  215. data/ui/helpers/developer_mode_helper.rb +2 -2
  216. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +1 -1
  217. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +1 -1
  218. metadata +84 -3
  219. metadata.gz.sig +0 -0
  220. data/test/environments/rails23/config/environments/development.rb +0 -11
data.tar.gz.sig CHANGED
@@ -1,4 +1,2 @@
1
- ��eDnqPWZ���\ .�׮�"���x"=�$S��z��3R*�� ��`�$�3��}�+�;�
2
- ������y,������pO�?t�yVoZӚm�7�U��u�8�Xϑ��"(��2wR��� ����*�y G~�R����4�ݬ�w�q
3
- ��`>T�q�#p�bie'?t�.q���[R�2��P�2y���LڟO�Ig �!��C��
4
- ��O�"��ba�
1
+ �$�SU���뛙�ug'�{��Pe��?o���BT˨��؅��af�%�x��N��9D�qC�S�vb{| �梘\�ٸ5��*�|��*Å �l4.B�b`Z����:.h��ykJ$���!��!��jt+kN�"�����I���ql$?)�mO��Gy���������N�;�[�0 �/]�K�b�מ��������d)j}�e��GU���L_��l��-��p�� V?4�,�An
2
+ �´5�;�t
data/CHANGELOG CHANGED
@@ -1,5 +1,88 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v3.9.2 ##
4
+
5
+ * Added API for ignoring transactions
6
+
7
+ This release adds three new API calls for ignoring transactions:
8
+
9
+ - `NewRelic::Agent.ignore_transaction`
10
+ - `NewRelic::Agent.ignore_apdex`
11
+ - `NewRelic::Agent.ignore_enduser`
12
+
13
+ The first of these ignores a transaction completely: nothing about it will be
14
+ reported to New Relic. The second ignores only the Apdex metric for a single
15
+ transaction. The third disables javascript injection for browser monitoring
16
+ for the current transaction.
17
+
18
+ These methods differ from the existing newrelic_ignore_* method in that they
19
+ may be called *during* a transaction based on some dynamic runtime criteria,
20
+ as opposed to at the class level on startup.
21
+
22
+ See the docs for more details on how to use these methods:
23
+ https://docs.newrelic.com/docs/agents/ruby-agent/installation-and-configuration/ignoring-specific-transactions
24
+
25
+ * Improved SQL obfuscation
26
+
27
+ SQL queries containing string literals ending in backslash ('\') characters
28
+ would previously not have been obfuscated correctly by the Ruby agent prior to
29
+ transmission to New Relic. In addition, SQL comments were left un-obfuscated.
30
+ This has been fixed, and the test coverage for SQL obfuscation has been
31
+ improved.
32
+
33
+ * newrelic_ignore* methods now work when called in a superclass
34
+
35
+ The newrelic_ignore* family of methods previously did not apply to subclasses
36
+ of the class from which it was called, meaning that Rails controllers
37
+ inheriting from a single base class where newrelic_ignore had been called
38
+ would not be ignored. This has been fixed.
39
+
40
+ * Fix for rare crashes in Rack::Request#params on Sinatra apps
41
+
42
+ Certain kinds of malformed HTTP requests could previously have caused
43
+ unhandled exceptions in the Ruby agent's Sinatra instrumentation, in the
44
+ Rack::Request#params method. This has been fixed.
45
+
46
+ * Improved handling for rare errors caused by timeouts in Excon requests
47
+
48
+ In some rare cases, the agent would emit a warning message in its log file and
49
+ abort instrumentation of a transaction if a timeout occurred during an
50
+ Excon request initiated from within that transaction. This has been fixed.
51
+
52
+ * Improved behavior when the agent is misconfigured
53
+
54
+ When the agent is misconfigured by attempting to shut it down without
55
+ it ever having been started, or by attempting to disable instrumentation after
56
+ instrumentation has already been installed, the agent will no longer raise an
57
+ exception, but will instead log an error to its log file.
58
+
59
+ * Fix for ignore_error_filter not working in some configurations
60
+
61
+ The ignore_error_filter method allows you to specify a block to be evaluated
62
+ in order to determine whether a given error should be ignored by the agent.
63
+ If the agent was initially disabled, and then later enabled with a call to
64
+ manual_start, the ignore_error_filter would not work. This has been fixed.
65
+
66
+ * Fix for Capistrano 3 ignoring newrelic_revion
67
+
68
+ New Relic's Capistrano recipies support passing parameters to control the
69
+ values recorded with deployments, but user provided :newrelic_revision was
70
+ incorrectly overwritten. This has been fixed.
71
+
72
+ * Agent errors logged with ruby-prof in production
73
+
74
+ If the ruby-prof gem was available in an environment without New Relic's
75
+ developer mode enabled, the agent would generate errors to its log. This has
76
+ been fixed.
77
+
78
+ * Tighter requirements on naming for configuration environment variables
79
+
80
+ The agent would previously assume any environment variable containing
81
+ 'NEWRELIC' was a configuration setting. It now looks for this string as a
82
+ prefix only.
83
+
84
+ Thanks to Chad Woolley for the contribution!
85
+
3
86
  ## v3.9.1 ##
4
87
 
5
88
  * Ruby 1.8.7 users: upgrade or add JSON gem now
@@ -14,6 +97,18 @@
14
97
  For more details, see:
15
98
  https://docs.newrelic.com/docs/ruby/ruby-1.8.7-support
16
99
 
100
+ * Support for new Cross Application Trace view
101
+
102
+ This release enhances cross application tracing with a visualization of
103
+ the cross application calls that a specific Transaction Trace is involved
104
+ in. The new visualization helps you spot bottlenecks in external services
105
+ within Transaction Traces and gives you an end-to-end understanding
106
+ of how the transaction trace is used by other applications and services.
107
+ This leads to faster problem diagnosis and better collaboration across
108
+ teams. All agents involved in the cross application communication must
109
+ be upgraded to see the complete graph. You can view cross application
110
+ traces from in the Transaction Trace drill-down.
111
+
17
112
  * High security mode V2
18
113
 
19
114
  The Ruby agent now supports V2 of New Relic's high security mode. To enable
@@ -60,7 +155,7 @@
60
155
 
61
156
  * Fix for occasional spikes in external services time
62
157
 
63
- Certain kinds of failures during HTTP reqeusts made by an application could
158
+ Certain kinds of failures during HTTP requests made by an application could
64
159
  have previously resulted in the Ruby agent reporting erroneously large amounts
65
160
  of time spent in outgoing HTTP requests. This issue manifested most obviously
66
161
  in spikes on the 'Web external' band on the main overview graph. This issue
@@ -1036,7 +1131,6 @@
1036
1131
  going back for a year.
1037
1132
 
1038
1133
 
1039
- ### previous versions ###
1040
1134
  ## v3.4.2.1 ##
1041
1135
 
1042
1136
  * Fix issue when app_name is nil
@@ -90,6 +90,7 @@ module NewRelic
90
90
  require 'new_relic/agent/shim_agent'
91
91
  require 'new_relic/agent/method_tracer'
92
92
  require 'new_relic/agent/worker_loop'
93
+ require 'new_relic/agent/event_loop'
93
94
  require 'new_relic/agent/stats_engine'
94
95
  require 'new_relic/agent/transaction_sampler'
95
96
  require 'new_relic/agent/sql_sampler'
@@ -150,7 +151,10 @@ module NewRelic
150
151
 
151
152
  # The singleton Agent instance. Used internally.
152
153
  def agent #:nodoc:
153
- @agent || raise("Plugin not initialized!")
154
+ return @agent if @agent
155
+ NewRelic::Agent.logger.warn("Agent unavailable as it hasn't been started.")
156
+ NewRelic::Agent.logger.warn(caller.join("\n"))
157
+ nil
154
158
  end
155
159
 
156
160
  def agent=(new_instance)#:nodoc:
@@ -322,7 +326,7 @@ module NewRelic
322
326
  # @api public
323
327
  #
324
328
  def shutdown(options={})
325
- agent.shutdown(options)
329
+ agent.shutdown(options) if agent
326
330
  end
327
331
 
328
332
  # Add instrumentation files to the agent. The argument should be
@@ -393,11 +397,46 @@ module NewRelic
393
397
  end
394
398
  end
395
399
 
400
+ # This method disables the recording of the current transaction. No metrics,
401
+ # traced errors, transaction traces, Insights events, slow SQL traces,
402
+ # or RUM injection will happen for this transaction.
403
+ #
404
+ # @api public
405
+ #
406
+ def ignore_transaction
407
+ txn = NewRelic::Agent::Transaction.tl_current
408
+ txn.ignore! if txn
409
+ end
410
+
411
+ # This method disables the recording of Apdex metrics in the current
412
+ # transaction.
413
+ #
414
+ # @api public
415
+ #
416
+ def ignore_apdex
417
+ txn = NewRelic::Agent::Transaction.tl_current
418
+ txn.ignore_apdex! if txn
419
+ end
420
+
421
+ # This method disables browser monitoring javascript injection in the
422
+ # current transaction.
423
+ #
424
+ # @api public
425
+ #
426
+ def ignore_enduser
427
+ txn = NewRelic::Agent::Transaction.tl_current
428
+ txn.ignore_enduser! if txn
429
+ end
430
+
396
431
  # Cancel the collection of the current transaction in progress, if
397
432
  # any. Only affects the transaction started on this thread once
398
433
  # it has started and before it has completed.
399
434
  #
435
+ # This method has been deprecated in favor of ignore_transaction,
436
+ # which does what people expect this method to do.
437
+ #
400
438
  # @api public
439
+ # @deprecated
401
440
  #
402
441
  def abort_transaction!
403
442
  Transaction.abort_transaction!
@@ -446,7 +485,11 @@ module NewRelic
446
485
  # @api public
447
486
  #
448
487
  def ignore_error_filter(&block)
449
- agent.error_collector.ignore_error_filter(&block)
488
+ if block
489
+ NewRelic::Agent::ErrorCollector.ignore_error_filter = block
490
+ else
491
+ NewRelic::Agent::ErrorCollector.ignore_error_filter
492
+ end
450
493
  end
451
494
 
452
495
  # Record the given error. It will be passed through the
@@ -568,7 +611,7 @@ module NewRelic
568
611
  # to any registered handlers.
569
612
  def notify(event_type, *args)
570
613
  agent.events.notify( event_type, *args )
571
- rescue => err
614
+ rescue
572
615
  NewRelic::Agent.logger.debug "Ignoring exception during %p event notification" % [event_type]
573
616
  end
574
617
 
@@ -137,8 +137,6 @@ module NewRelic
137
137
  # we should be ready to run and shouldn't restarting if we can't.
138
138
  @harvester.mark_started
139
139
 
140
- Agent.config.replace_or_add_config(NewRelic::Agent::Configuration::ManualSource.new(options))
141
-
142
140
  if channel_id = options[:report_to_channel]
143
141
  @service = NewRelic::Agent::PipeService.new(channel_id)
144
142
  if connected?
@@ -178,7 +176,7 @@ module NewRelic
178
176
  return if not started?
179
177
  ::NewRelic::Agent.logger.info "Starting Agent shutdown"
180
178
 
181
- stop_worker_loop
179
+ stop_event_loop
182
180
  trap_signals_for_litespeed
183
181
  untraced_graceful_disconnect
184
182
  revert_to_default_configuration
@@ -192,10 +190,10 @@ module NewRelic
192
190
  NewRelic::Agent.config.remove_config_type(:server)
193
191
  end
194
192
 
195
- def stop_worker_loop
196
- if @worker_loop
197
- @worker_loop.run_task if Agent.config[:force_send]
198
- @worker_loop.stop
193
+ def stop_event_loop
194
+ if @event_loop
195
+ @event_loop.run_once(true) if Agent.config[:force_send]
196
+ @event_loop.stop
199
197
  end
200
198
  end
201
199
 
@@ -527,13 +525,6 @@ module NewRelic
527
525
  # start_worker_thread method - this is an artifact of
528
526
  # refactoring and can be moved, renamed, etc at will
529
527
  module StartWorkerThread
530
- # logs info about the worker loop so users can see when the
531
- # agent actually begins running in the background
532
- def log_worker_loop_start
533
- ::NewRelic::Agent.logger.debug "Reporting performance data every #{Agent.config[:data_report_period]} seconds."
534
- ::NewRelic::Agent.logger.debug "Running worker loop"
535
- end
536
-
537
528
  # Synchronize with the harvest loop. If the harvest thread has taken
538
529
  # a lock (DNS lookups, backticks, agent-owned locks, etc), and we
539
530
  # fork while locked, this can deadlock child processes. For more
@@ -552,15 +543,39 @@ module NewRelic
552
543
  harvest_lock.unlock if harvest_lock.locked?
553
544
  end
554
545
 
555
- def create_worker_loop
556
- WorkerLoop.new
546
+ def create_event_loop
547
+ EventLoop.new
557
548
  end
558
549
 
559
- def create_and_run_worker_loop
560
- @worker_loop = create_worker_loop
561
- @worker_loop.run(Agent.config[:data_report_period]) do
550
+ # Never allow any data type to be reported more frequently than once
551
+ # per second.
552
+ MIN_ALLOWED_REPORT_PERIOD = 1.0
553
+
554
+ def report_period_for(method)
555
+ config_key = "data_report_periods.#{method}".to_sym
556
+ period = Agent.config[config_key]
557
+ if !period
558
+ period = Agent.config[:data_report_period]
559
+ ::NewRelic::Agent.logger.warn("Could not find configured period for #{method}, falling back to data_report_period (#{period} s)")
560
+ end
561
+ if period < MIN_ALLOWED_REPORT_PERIOD
562
+ ::NewRelic::Agent.logger.warn("Configured #{config_key} was #{period}, but minimum allowed is #{MIN_ALLOWED_REPORT_PERIOD}, using #{MIN_ALLOWED_REPORT_PERIOD}.")
563
+ period = MIN_ALLOWED_REPORT_PERIOD
564
+ end
565
+ period
566
+ end
567
+
568
+ def create_and_run_event_loop
569
+ @event_loop = create_event_loop
570
+ @event_loop.on(:report_data) do
562
571
  transmit_data
563
572
  end
573
+ @event_loop.on(:report_transaction_event_data) do
574
+ transmit_transaction_event_data
575
+ end
576
+ @event_loop.fire_every(Agent.config[:data_report_period], :report_data)
577
+ @event_loop.fire_every(report_period_for(:analytic_event_data), :report_transaction_event_data)
578
+ @event_loop.run
564
579
  end
565
580
 
566
581
  # Handles the case where the server tells us to restart -
@@ -618,14 +633,9 @@ module NewRelic
618
633
  def deferred_work!(connection_options)
619
634
  catch_errors do
620
635
  NewRelic::Agent.disable_all_tracing do
621
- # We try to connect. If this returns false that means
622
- # the server rejected us for a licensing reason and we should
623
- # just exit the thread. If it returns nil
624
- # that means it didn't try to connect because we're in the master.
625
636
  connect(connection_options)
626
637
  if connected?
627
- log_worker_loop_start
628
- create_and_run_worker_loop
638
+ create_and_run_event_loop
629
639
  # never reaches here unless there is a problem or
630
640
  # the agent is exiting
631
641
  else
@@ -756,6 +766,7 @@ module NewRelic
756
766
  :host => local_host,
757
767
  :app_name => Agent.config.app_names,
758
768
  :language => 'ruby',
769
+ :labels => Agent.config.parsed_labels,
759
770
  :agent_version => NewRelic::VERSION::STRING,
760
771
  :environment => @environment_report,
761
772
  :settings => Agent.config.to_collector_hash,
@@ -1008,6 +1019,20 @@ module NewRelic
1008
1019
  end
1009
1020
  end
1010
1021
 
1022
+ def transmit_transaction_event_data
1023
+ now = Time.now
1024
+ ::NewRelic::Agent.logger.debug "Sending analytics data to New Relic Service"
1025
+
1026
+ harvest_lock.synchronize do
1027
+ @service.session do # use http keep-alive
1028
+ harvest_and_send_analytic_event_data
1029
+ end
1030
+ end
1031
+ ensure
1032
+ duration = (Time.now - now).to_f
1033
+ NewRelic::Agent.record_metric('Supportability/TransactionEventHarvest', duration)
1034
+ end
1035
+
1011
1036
  # This method is expected to only be called with the harvest_lock
1012
1037
  # already held
1013
1038
  def transmit_data_already_locked
@@ -1020,7 +1045,6 @@ module NewRelic
1020
1045
  harvest_and_send_transaction_traces
1021
1046
  harvest_and_send_slowest_sql
1022
1047
  harvest_and_send_timeslice_data
1023
- harvest_and_send_analytic_event_data
1024
1048
 
1025
1049
  check_for_and_handle_agent_commands
1026
1050
  harvest_and_send_for_agent_commands
@@ -1047,6 +1071,7 @@ module NewRelic
1047
1071
 
1048
1072
  @events.notify(:before_shutdown)
1049
1073
  transmit_data
1074
+ transmit_transaction_event_data
1050
1075
 
1051
1076
  if @connected_pid == $$ && !@service.kind_of?(NewRelic::Agent::NewRelicService)
1052
1077
  ::NewRelic::Agent.logger.debug "Sending New Relic service agent run shutdown message"
@@ -172,6 +172,10 @@ module NewRelic
172
172
  def gather_startup_logs
173
173
  StartupLogger.instance.dump(self)
174
174
  end
175
+
176
+ def log_formatter=(formatter)
177
+ @log.formatter = formatter
178
+ end
175
179
  end
176
180
 
177
181
  # In an effort to not lose messages during startup, we trap them in memory
@@ -3,6 +3,8 @@
3
3
  # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
4
 
5
5
  require 'new_relic/agent/configuration/manager'
6
+ require 'new_relic/agent/configuration/dotted_hash'
7
+ require 'new_relic/agent/configuration/manual_source'
6
8
 
7
9
  # The agent's configuration is accessed through a configuration object exposed
8
10
  # by ::NewRelic::Agent.config. It provides a hash like interface to the
@@ -28,38 +30,6 @@ require 'new_relic/agent/configuration/manager'
28
30
  module NewRelic
29
31
  module Agent
30
32
  module Configuration
31
- class DottedHash < ::Hash
32
- def initialize(hash)
33
- self.merge!(dot_flattened(hash))
34
- keys.each do |key|
35
- self[(key.to_sym rescue key) || key] = delete(key)
36
- end
37
- end
38
-
39
- def inspect
40
- "#<#{self.class.name}:#{object_id} #{super}>"
41
- end
42
-
43
- def to_hash
44
- {}.replace(self)
45
- end
46
-
47
- protected
48
- # turns {'a' => {'b' => 'c'}} into {'a.b' => 'c'}
49
- def dot_flattened(nested_hash, names=[], result={})
50
- nested_hash.each do |key, val|
51
- next if val == nil
52
- if val.respond_to?(:has_key?)
53
- dot_flattened(val, names + [key], result)
54
- else
55
- result[(names + [key]).join('.')] = val
56
- end
57
- end
58
- result
59
- end
60
- end
61
-
62
- class ManualSource < DottedHash; end
63
33
  end
64
34
  end
65
35
  end
@@ -106,6 +106,13 @@ module NewRelic
106
106
  Proc.new { NewRelic::Agent::NewRelicService::JsonMarshaller.is_supported? ? 'json' : 'pruby' }
107
107
  end
108
108
 
109
+ # On Rubies with string encodings support (1.9.x+), default to always
110
+ # normalize encodings since it's safest and fast. Without that support
111
+ # the conversions are too expensive, so only enable if overridden to.
112
+ def self.normalize_json_string_encodings
113
+ Proc.new { NewRelic::LanguageSupport.supports_string_encodings? }
114
+ end
115
+
109
116
  def self.thread_profiler_enabled
110
117
  Proc.new { NewRelic::Agent::Threading::BacktraceService.is_supported? }
111
118
  end
@@ -235,6 +242,96 @@ module NewRelic
235
242
  :type => String,
236
243
  :description => "New Relic license key."
237
244
  },
245
+ :agent_enabled => {
246
+ :default => DefaultSource.agent_enabled,
247
+ :public => true,
248
+ :type => Boolean,
249
+ :description => 'Enable or disable the agent.'
250
+ },
251
+ :enabled => {
252
+ :default => true,
253
+ :public => false,
254
+ :type => Boolean,
255
+ :aliases => [:enable],
256
+ :description => 'Enable or disable the agent.'
257
+ },
258
+ :app_name => {
259
+ :default => DefaultSource.app_name,
260
+ :public => true,
261
+ :type => String,
262
+ :description => "Semicolon delimited list of application names where metrics will be recorded in the dashboard (e.g. 'MyApplication' or 'MyAppStaging;Instance1')."
263
+ },
264
+ :monitor_mode => {
265
+ :default => DefaultSource.monitor_mode,
266
+ :public => true,
267
+ :type => Boolean,
268
+ :description => 'Enable or disable transmission of data to the New Relic data collection service.'
269
+ },
270
+ :developer_mode => {
271
+ :default => DefaultSource.developer_mode,
272
+ :public => true,
273
+ :type => Boolean,
274
+ :description => "Enable or disable developer mode, a local analytics package built into the agent for rack applications. Access developer mode analytics by visiting '/newrelic' in your application."
275
+ },
276
+ :developer => {
277
+ :default => false,
278
+ :public => false,
279
+ :type => Boolean,
280
+ :description => 'Alternative method of enabling developer_mode.'
281
+ },
282
+ :log_level => {
283
+ :default => 'info',
284
+ :public => true,
285
+ :type => String,
286
+ :description => 'Log level for agent logging: error, warn, info or debug.'
287
+ },
288
+ :high_security => {
289
+ :default => false,
290
+ :public => true,
291
+ :type => Boolean,
292
+ :description => 'Enable or disable security features designed to protect data in an enterprise setting.'
293
+ },
294
+ :ssl => {
295
+ :default => true,
296
+ :allow_nil => true,
297
+ :public => true,
298
+ :type => Boolean,
299
+ :description => "Enable or disable SSL for transmissions to the New Relic data collection service. Default is true starting in version 3.5.6."
300
+ },
301
+ :proxy_host => {
302
+ :default => nil,
303
+ :allow_nil => true,
304
+ :public => true,
305
+ :type => String,
306
+ :description => 'Host for proxy server.'
307
+ },
308
+ :proxy_port => {
309
+ :default => nil,
310
+ :allow_nil => true,
311
+ :public => true,
312
+ :type => Fixnum,
313
+ :description => 'Port for proxy server.'
314
+ },
315
+ :proxy_user => {
316
+ :default => nil,
317
+ :allow_nil => true,
318
+ :public => true,
319
+ :type => String,
320
+ :description => 'User for proxy server.'
321
+ },
322
+ :proxy_pass => {
323
+ :default => nil,
324
+ :allow_nil => true,
325
+ :public => true,
326
+ :type => String,
327
+ :description => 'Password for proxy server.'
328
+ },
329
+ :capture_params => {
330
+ :default => false,
331
+ :public => true,
332
+ :type => Boolean,
333
+ :description => 'Enable or disable capturing and attachment of HTTP request parameters to transaction traces and traced errors.'
334
+ },
238
335
  :config_path => {
239
336
  :default => DefaultSource.config_path,
240
337
  :public => true,
@@ -247,12 +344,6 @@ module NewRelic
247
344
  :type => Array,
248
345
  :description => "An array of candidate locations for the agent's configuration file."
249
346
  },
250
- :app_name => {
251
- :default => DefaultSource.app_name,
252
- :public => true,
253
- :type => String,
254
- :description => "Semicolon delimited list of application names where metrics will be recorded in the dashboard (e.g. 'MyApplication' or 'MyAppStaging;Instance1')."
255
- },
256
347
  :dispatcher => {
257
348
  :default => DefaultSource.dispatcher,
258
349
  :public => false,
@@ -265,25 +356,6 @@ module NewRelic
265
356
  :type => Symbol,
266
357
  :description => 'Autodetected application framework used to enable framework-specific functionality.'
267
358
  },
268
- :enabled => {
269
- :default => true,
270
- :public => false,
271
- :type => Boolean,
272
- :aliases => [:enable],
273
- :description => 'Enable or disable the agent.'
274
- },
275
- :monitor_mode => {
276
- :default => DefaultSource.monitor_mode,
277
- :public => true,
278
- :type => Boolean,
279
- :description => 'Enable or disable transmission of data to the New Relic data collection service.'
280
- },
281
- :agent_enabled => {
282
- :default => DefaultSource.agent_enabled,
283
- :public => true,
284
- :type => Boolean,
285
- :description => 'Enable or disable the agent.'
286
- },
287
359
  :'autostart.blacklisted_constants' => {
288
360
  :default => 'Rails::Console',
289
361
  :public => true,
@@ -302,18 +374,6 @@ module NewRelic
302
374
  :type => String,
303
375
  :description => "Comma delimited list of rake tasks that should not be instrumented by the agent (e.g. 'assets:precompile,db:migrate')."
304
376
  },
305
- :developer_mode => {
306
- :default => DefaultSource.developer_mode,
307
- :public => true,
308
- :type => Boolean,
309
- :description => "Enable or disable developer mode, a local analytics package built into the agent for rack applications. Access developer mode analytics by visiting '/newrelic' in your application."
310
- },
311
- :developer => {
312
- :default => false,
313
- :public => false,
314
- :type => Boolean,
315
- :description => 'Alternative method of enabling developer_mode.'
316
- },
317
377
  :'profiling.available' => {
318
378
  :default => DefaultSource.profiling_available,
319
379
  :public => false,
@@ -324,7 +384,8 @@ module NewRelic
324
384
  :default => 0.5,
325
385
  :public => true,
326
386
  :type => Float,
327
- :description => 'Threshold at which New Relic will begin alerting. By default the agent will send alerts when the Apdex score drops below 0.5, or when more than half of users are experiencing degraded application performance.'
387
+ :deprecated => true,
388
+ :description => 'As of Ruby Agent version 3.5.0, setting your Apdex T has been moved to the New Relic UI. Threshold at which New Relic will begin alerting. By default the agent will send alerts when the Apdex score drops below 0.5, or when more than half of users are experiencing degraded application performance.'
328
389
  },
329
390
  :monitor_daemons => {
330
391
  :default => false,
@@ -332,12 +393,6 @@ module NewRelic
332
393
  :type => Boolean,
333
394
  :description => 'Enables or disables the agent for background processes. No longer necessary as the agent now automatically instruments background processes.'
334
395
  },
335
- :high_security => {
336
- :default => false,
337
- :public => true,
338
- :type => Boolean,
339
- :description => 'Enable or disable security features designed to protect data in an enterprise setting.'
340
- },
341
396
  :'strip_exception_messages.enabled' => {
342
397
  :default => DefaultSource.strip_exception_messages_enabled,
343
398
  :public => true,
@@ -374,41 +429,6 @@ module NewRelic
374
429
  :type => Fixnum,
375
430
  :description => 'Port for the New Relic API host.'
376
431
  },
377
- :ssl => {
378
- :default => true,
379
- :allow_nil => true,
380
- :public => true,
381
- :type => Boolean,
382
- :description => "Enable or disable SSL for transmissions to the New Relic data collection service."
383
- },
384
- :proxy_host => {
385
- :default => nil,
386
- :allow_nil => true,
387
- :public => false,
388
- :type => String,
389
- :description => 'Host for proxy server.'
390
- },
391
- :proxy_port => {
392
- :default => nil,
393
- :allow_nil => true,
394
- :public => false,
395
- :type => Fixnum,
396
- :description => 'Port for proxy server.'
397
- },
398
- :proxy_user => {
399
- :default => nil,
400
- :allow_nil => true,
401
- :public => false,
402
- :type => String,
403
- :description => 'User for proxy server.'
404
- },
405
- :proxy_pass => {
406
- :default => nil,
407
- :allow_nil => true,
408
- :public => false,
409
- :type => String,
410
- :description => 'Password for proxy server.'
411
- },
412
432
  :sync_startup => {
413
433
  :default => false,
414
434
  :public => true,
@@ -455,13 +475,21 @@ module NewRelic
455
475
  :default => 60,
456
476
  :public => false,
457
477
  :type => Fixnum,
458
- :description => 'Number of seconds betwixt connections to the New Relic data collection service.'
478
+ :description => 'Number of seconds betwixt connections to the New Relic data collection service. Note that transaction events have a separate report period, specified by data_report_periods.analytic_event_data.'
479
+ },
480
+ :'data_report_periods.analytic_event_data' => {
481
+ :default => 60,
482
+ :public => false,
483
+ :type => Fixnum,
484
+ :dynamic_name => true,
485
+ :description => 'Number of seconds between connections to the New Relic data collection service for sending transaction event data.'
459
486
  },
460
487
  :keep_retrying => {
461
488
  :default => true,
462
489
  :public => false,
463
490
  :type => Boolean,
464
- :description => '(Deprecated) Enable or disable retrying failed connections to the New Relic data collection service.'
491
+ :deprecated => true,
492
+ :description => 'Enable or disable retrying failed connections to the New Relic data collection service.'
465
493
  },
466
494
  :force_reconnect => {
467
495
  :default => false,
@@ -487,12 +515,6 @@ module NewRelic
487
515
  :type => String,
488
516
  :description => 'Path to the agent log file, excluding the filename.'
489
517
  },
490
- :log_level => {
491
- :default => 'info',
492
- :public => true,
493
- :type => String,
494
- :description => 'Log level for agent logging: error, warn, info or debug.'
495
- },
496
518
  :'audit_log.enabled' => {
497
519
  :default => false,
498
520
  :public => true,
@@ -583,12 +605,6 @@ module NewRelic
583
605
  :type => Boolean,
584
606
  :description => 'Enable or disable usage of GC::Profiler to measure time spent in garbage collection'
585
607
  },
586
- :capture_params => {
587
- :default => false,
588
- :public => true,
589
- :type => Boolean,
590
- :description => 'Enable or disable capturing and attachment of HTTP request parameters to transaction traces and traced errors.'
591
- },
592
608
  :'sidekiq.capture_params' => {
593
609
  :default => false,
594
610
  :public => true,
@@ -617,19 +633,25 @@ module NewRelic
617
633
  :default => DefaultSource.transaction_tracer_transaction_threshold,
618
634
  :public => true,
619
635
  :type => Float,
620
- :description => 'Transaction traces will be generated for transactions that exceed this threshold.'
636
+ :description => 'Transaction traces will be generated for transactions that exceed this threshold. Valid values are any float value, or (default) `apdex_f`, which will use the threshold for an dissatisfying Apdex controller action - four times the Apdex T value.'
621
637
  },
622
- :'transaction_tracer.stack_trace_threshold' => {
623
- :default => 0.5,
638
+ :'transaction_tracer.record_sql' => {
639
+ :default => 'obfuscated',
624
640
  :public => true,
625
- :type => Float,
626
- :description => 'Stack traces will be included in transaction trace segments with durations that exceed this threshold.'
641
+ :type => String,
642
+ :description => "Obfuscation level for sql queries reported in transaction trace segments (e.g. 'obfuscated', 'raw', 'none')."
643
+ },
644
+ :'transaction_tracer.capture_attributes' => {
645
+ :default => true,
646
+ :public => true,
647
+ :type => Boolean,
648
+ :description => 'Enable or disable collection of custom attributes on transaction traces.'
627
649
  },
628
650
  :'transaction_tracer.explain_threshold' => {
629
651
  :default => 0.5,
630
652
  :public => true,
631
653
  :type => Float,
632
- :description => 'Explain plans will be generated and included in transaction trace segments with durations that exceed this threshold.'
654
+ :description => 'Explain plans will be generated and included in transaction trace segments with durations that exceed this threshold. Relevant only when `explain_enabled` is true.'
633
655
  },
634
656
  :'transaction_tracer.explain_enabled' => {
635
657
  :default => true,
@@ -637,17 +659,11 @@ module NewRelic
637
659
  :type => Boolean,
638
660
  :description => 'Enable or disable the generation and inclusion of explain queries in transaction trace segments.'
639
661
  },
640
- :'transaction_tracer.record_sql' => {
641
- :default => 'obfuscated',
642
- :public => true,
643
- :type => String,
644
- :description => "Obfuscation level for sql queries reported in transaction trace segments (e.g. 'obfuscated', 'raw', 'none')."
645
- },
646
- :'transaction_tracer.capture_attributes' => {
647
- :default => true,
662
+ :'transaction_tracer.stack_trace_threshold' => {
663
+ :default => 0.5,
648
664
  :public => true,
649
- :type => Boolean,
650
- :description => 'Enable or disable collection of custom attributes on transaction traces.'
665
+ :type => Float,
666
+ :description => 'Stack traces will be included in transaction trace segments with durations that exceed this threshold.'
651
667
  },
652
668
  :'transaction_tracer.limit_segments' => {
653
669
  :default => 4000,
@@ -729,7 +745,7 @@ module NewRelic
729
745
  },
730
746
  :'rum.enabled' => {
731
747
  :default => true,
732
- :public => true,
748
+ :public => false,
733
749
  :type => Boolean,
734
750
  :description => 'Enable or disable page load timing (sometimes referred to as real user monitoring or RUM).'
735
751
  },
@@ -769,6 +785,12 @@ module NewRelic
769
785
  :type => Boolean,
770
786
  :description => 'Enable or disable automatic insertion of the JavaScript header into outgoing responses for page load timing (sometimes referred to as real user monitoring or RUM).'
771
787
  },
788
+ :'browser_monitoring.capture_attributes' => {
789
+ :default => false,
790
+ :public => true,
791
+ :type => Boolean,
792
+ :description => 'Include custom attributes in real user monitoring script in outgoing responses.'
793
+ },
772
794
  :'browser_monitoring.loader' => {
773
795
  :default => DefaultSource.browser_monitoring_loader,
774
796
  :public => private,
@@ -794,17 +816,12 @@ module NewRelic
794
816
  :type => Boolean,
795
817
  :description => 'Enable or disable HTTPS instrumentation by JavaScript agent on HTTP pages.'
796
818
  },
797
- :'browser_monitoring.capture_attributes' => {
798
- :default => false,
799
- :public => true,
800
- :type => Boolean,
801
- :description => 'Include custom attributes in real user monitoring script in outgoing responses.'
802
- },
803
819
  :'capture_attributes.page_view_events' => {
804
820
  :default => false,
805
821
  :public => false,
806
822
  :type => Boolean,
807
- :description => 'Deprecated setting that is still in use by a few clients. Correct setting is browser_monitoring.capture_attributes.'
823
+ :deprecated => true,
824
+ :description => 'Correct setting is browser_monitoring.capture_attributes.'
808
825
  },
809
826
  :js_agent_loader => {
810
827
  :default => '',
@@ -916,7 +933,7 @@ module NewRelic
916
933
  :description => 'Controls whether to check on running a transaction whether to respawn the harvest thread.'
917
934
  },
918
935
  :normalize_json_string_encodings => {
919
- :default => true,
936
+ :default => DefaultSource.normalize_json_string_encodings,
920
937
  :public => false,
921
938
  :type => Boolean,
922
939
  :description => 'Controls whether to normalize string encodings prior to serializing data for the collector to JSON.'
@@ -1023,6 +1040,24 @@ module NewRelic
1023
1040
  :public => false,
1024
1041
  :type => Boolean,
1025
1042
  :description => 'Controls whether or not we use the heroku dyno name as the hostname.'
1043
+ },
1044
+ :labels => {
1045
+ :default => '',
1046
+ :public => true,
1047
+ :type => String,
1048
+ :description => 'A dictionary of label names and values that will be applied to the data sent from this agent. May also be expressed as a semi-colon delimited string of colon-separated pairs (e.g. "Server:One;Data Center:Primary".'
1049
+ },
1050
+ :aggressive_keepalive => {
1051
+ :default => false,
1052
+ :public => false,
1053
+ :type => Boolean,
1054
+ :description => 'If true, attempt to keep the TCP connection to the collector alive between harvests.'
1055
+ },
1056
+ :keep_alive_timeout => {
1057
+ :default => 60,
1058
+ :public => false,
1059
+ :type => Fixnum,
1060
+ :description => 'Timeout for keep alive on TCP connection to collector if supported by Ruby version. Only used in conjunction when aggressive_keepalive is enabled.'
1026
1061
  }
1027
1062
  }.freeze
1028
1063