newrelic_rpm 7.0.0 → 8.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/CHANGELOG.md +226 -0
  4. data/CONTRIBUTING.md +13 -2
  5. data/README.md +5 -1
  6. data/lib/new_relic/agent/adaptive_sampler.rb +2 -2
  7. data/lib/new_relic/agent/agent.rb +8 -7
  8. data/lib/new_relic/agent/commands/thread_profiler_session.rb +7 -3
  9. data/lib/new_relic/agent/configuration/default_source.rb +229 -158
  10. data/lib/new_relic/agent/configuration/event_harvest_config.rb +28 -12
  11. data/lib/new_relic/agent/configuration/manager.rb +1 -2
  12. data/lib/new_relic/agent/configuration/server_source.rb +3 -2
  13. data/lib/new_relic/agent/configuration/yaml_source.rb +22 -1
  14. data/lib/new_relic/agent/connect/request_builder.rb +4 -2
  15. data/lib/new_relic/agent/custom_event_aggregator.rb +2 -1
  16. data/lib/new_relic/agent/database.rb +5 -2
  17. data/lib/new_relic/agent/datastores/mongo.rb +5 -10
  18. data/lib/new_relic/agent/datastores.rb +7 -7
  19. data/lib/new_relic/agent/distributed_tracing/cross_app_payload.rb +5 -5
  20. data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +10 -6
  21. data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +0 -1
  22. data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +1 -1
  23. data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +6 -6
  24. data/lib/new_relic/agent/error_collector.rb +52 -37
  25. data/lib/new_relic/agent/error_filter.rb +175 -0
  26. data/lib/new_relic/agent/event_loop.rb +6 -6
  27. data/lib/new_relic/agent/external.rb +0 -32
  28. data/lib/new_relic/agent/http_clients/abstract.rb +2 -2
  29. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +7 -1
  30. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +1 -1
  31. data/lib/new_relic/agent/instrumentation/active_merchant.rb +3 -3
  32. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +1 -3
  33. data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +1 -1
  34. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +2 -1
  35. data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +4 -4
  36. data/lib/new_relic/agent/instrumentation/excon.rb +4 -23
  37. data/lib/new_relic/agent/instrumentation/logger/chain.rb +21 -0
  38. data/lib/new_relic/agent/instrumentation/logger/instrumentation.rb +59 -0
  39. data/lib/new_relic/agent/instrumentation/logger/prepend.rb +13 -0
  40. data/lib/new_relic/agent/instrumentation/logger.rb +25 -0
  41. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +5 -1
  42. data/lib/new_relic/agent/instrumentation/memcache/helper.rb +5 -0
  43. data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +8 -2
  44. data/lib/new_relic/agent/instrumentation/mongo.rb +3 -141
  45. data/lib/new_relic/agent/instrumentation/net_http.rb +6 -1
  46. data/lib/new_relic/agent/instrumentation/padrino/chain.rb +23 -19
  47. data/lib/new_relic/agent/instrumentation/padrino/prepend.rb +1 -1
  48. data/lib/new_relic/agent/instrumentation/padrino.rb +4 -2
  49. data/lib/new_relic/agent/instrumentation/queue_time.rb +4 -4
  50. data/lib/new_relic/agent/instrumentation/rack/chain.rb +3 -2
  51. data/lib/new_relic/agent/instrumentation/rack/prepend.rb +2 -1
  52. data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +5 -41
  53. data/lib/new_relic/agent/instrumentation/redis.rb +4 -0
  54. data/lib/new_relic/agent/instrumentation/resque/helper.rb +19 -0
  55. data/lib/new_relic/agent/instrumentation/resque/instrumentation.rb +5 -3
  56. data/lib/new_relic/agent/instrumentation/resque.rb +13 -4
  57. data/lib/new_relic/agent/instrumentation/sidekiq.rb +6 -1
  58. data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +8 -2
  59. data/lib/new_relic/agent/instrumentation/tilt/chain.rb +24 -0
  60. data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +41 -0
  61. data/lib/new_relic/agent/instrumentation/tilt/prepend.rb +13 -0
  62. data/lib/new_relic/agent/instrumentation/tilt.rb +25 -0
  63. data/lib/new_relic/agent/javascript_instrumentor.rb +15 -10
  64. data/lib/new_relic/agent/logging.rb +5 -6
  65. data/lib/new_relic/agent/messaging.rb +10 -24
  66. data/lib/new_relic/agent/method_tracer.rb +137 -138
  67. data/lib/new_relic/agent/monitors/cross_app_monitor.rb +8 -1
  68. data/lib/new_relic/agent/new_relic_service.rb +16 -12
  69. data/lib/new_relic/agent/pipe_channel_manager.rb +10 -6
  70. data/lib/new_relic/agent/pipe_service.rb +1 -1
  71. data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -1
  72. data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +9 -6
  73. data/lib/new_relic/agent/span_event_aggregator.rb +2 -2
  74. data/lib/new_relic/agent/sql_sampler.rb +3 -3
  75. data/lib/new_relic/agent/stats_engine/stats_hash.rb +1 -1
  76. data/lib/new_relic/agent/stats_engine.rb +1 -1
  77. data/lib/new_relic/agent/threading/backtrace_service.rb +4 -5
  78. data/lib/new_relic/agent/threading/thread_profile.rb +1 -1
  79. data/lib/new_relic/agent/tracer.rb +15 -37
  80. data/lib/new_relic/agent/transaction/abstract_segment.rb +3 -3
  81. data/lib/new_relic/agent/transaction/datastore_segment.rb +3 -0
  82. data/lib/new_relic/agent/transaction/distributed_tracer.rb +1 -0
  83. data/lib/new_relic/agent/transaction/external_request_segment.rb +3 -0
  84. data/lib/new_relic/agent/transaction/message_broker_segment.rb +5 -11
  85. data/lib/new_relic/agent/transaction/segment.rb +3 -0
  86. data/lib/new_relic/agent/transaction.rb +7 -28
  87. data/lib/new_relic/agent/transaction_time_aggregator.rb +5 -5
  88. data/lib/new_relic/agent/vm/snapshot.rb +1 -1
  89. data/lib/new_relic/agent/worker_loop.rb +5 -5
  90. data/lib/new_relic/agent.rb +10 -7
  91. data/lib/new_relic/cli/commands/deployments.rb +2 -2
  92. data/lib/new_relic/constants.rb +0 -4
  93. data/lib/new_relic/noticed_error.rb +4 -4
  94. data/lib/new_relic/version.rb +2 -2
  95. data/lib/newrelic_rpm.rb +10 -34
  96. data/lib/tasks/all.rb +1 -1
  97. data/lib/tasks/config.html.erb +14 -25
  98. data/lib/tasks/config.rake +8 -7
  99. data/newrelic.yml +580 -3
  100. data/newrelic_rpm.gemspec +1 -1
  101. data/test/agent_helper.rb +27 -2
  102. metadata +13 -11
  103. data/lib/new_relic/agent/datastores/mongo/statement_formatter.rb +0 -53
  104. data/lib/new_relic/agent/instrumentation/excon/connection.rb +0 -49
  105. data/lib/new_relic/agent/instrumentation/merb/controller.rb +0 -44
  106. data/lib/new_relic/agent/instrumentation/merb/errors.rb +0 -33
  107. data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +0 -125
  108. data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +0 -46
  109. data/lib/new_relic/agent/supported_versions.rb +0 -275
  110. data/lib/new_relic/control/frameworks/merb.rb +0 -29
@@ -1,275 +0,0 @@
1
- # encoding: utf-8
2
- # This file is distributed under New Relic's license terms.
3
- # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
-
5
- module NewRelic
6
- module Agent
7
- SUPPORTED_VERSIONS =
8
- {
9
- # Rubies
10
- :mri =>
11
- {
12
- :type => :ruby,
13
- :name => "MRI",
14
- :supported => ["2.0.0", "~>2.1.0", "~>2.2.0", "~>2.3.0", "~>2.4.0", "~>2.5.0", "~>2.6.0", "~>2.7.0"],
15
- :deprecated => ["1.8.6", "1.8.7", "1.9.2", "1.9.3"],
16
- :url => "https://www.ruby-lang.org",
17
- :feed => "https://www.ruby-lang.org/en/feeds/news.rss",
18
- :notes => ["Last supported agent for 1.8.7, 1.9.2, and 1.9.3 was 3.18.1.330.",
19
- "Last supported agent on 1.8.6 was 3.6.8.168."]
20
- },
21
- :jruby =>
22
- {
23
- :type => :ruby,
24
- :name => "JRuby",
25
- :supported => ["~>9.0", "~>9.1"],
26
- :deprecated => ["~>1.7.0"],
27
- :url => "http://jruby.org",
28
- :feed => "http://jruby.org/atom.xml",
29
- :notes => ["Last supported agent for ~>1.7.0 was 3.18.1.330."]
30
- },
31
-
32
- # App servers
33
- :passenger =>
34
- {
35
- :type => :app_server,
36
- :supported => ["~>2.2", "~>3.0", "~>4.0"],
37
- :url => "http://www.phusionpassenger.com/",
38
- :feed => "http://rubygems.org/gems/passenger/versions.atom"
39
- },
40
- :thin =>
41
- {
42
- :type => :app_server,
43
- :supported => ["~>1.0"],
44
- :url => "http://code.macournoyer.com/thin/",
45
- :feed => "http://rubygems.org/gems/thin/versions.atom"
46
- },
47
- :unicorn =>
48
- {
49
- :type => :app_server,
50
- :supported => ["~>4.0"],
51
- :deprecated => ["~>1.0", "~>2.0", "~>3.0"],
52
- :url => "http://unicorn.bogomips.org/",
53
- :feed => "http://rubygems.org/gems/unicorn/versions.atom"
54
- },
55
- :puma =>
56
- {
57
- :type => :app_server,
58
- :supported => ["~>2.0"],
59
- :deprecated => ["~>1.0"],
60
- :url => "http://puma.io/",
61
- :feed => "http://rubygems.org/gems/puma/versions.atom"
62
- },
63
- :rainbows =>
64
- {
65
- :type => :app_server,
66
- :name => "rainbows!",
67
- :experimental=> ["4.5.0"],
68
- :url => "http://rainbows.rubyforge.org/",
69
- :feed => "http://rubygems.org/gems/rainbows/versions.atom"
70
- },
71
- :webrick =>
72
- {
73
- :type => :app_server,
74
- :notes => [ "Supported for all agent-supported versions of Ruby" ]
75
- },
76
-
77
- # Web frameworks
78
- :rails =>
79
- {
80
- :type => :web,
81
- :supported => ["~3.0.0", "~>3.1.0", "~>3.2.0", "~>4.0.0", "~>4.1.0", "~>4.2.0", "~>5.0.0", "~>5.1.0"],
82
- :deprecated => ["~>2.0.0", "~>2.1.0", "~>2.2.0", "~>2.3.0"],
83
- :url => "https://rubygems.org/gems/rails",
84
- :feed => "https://rubygems.org/gems/rails/versions.atom",
85
- :notes => ["Last supported agent for ~>2.1.0, ~>2.2.0, and ~>2.3.0 was 3.18.1.330.",
86
- "Last supported agent for 2.0.x was 3.6.8.168."]
87
- },
88
- :sinatra =>
89
- {
90
- :type => :web,
91
- :supported => ["~>1.2.0", "~>1.3.0", "~>1.4.0", "~>2.0.0"],
92
- :url => "https://rubygems.org/gems/sinatra",
93
- :feed => "https://rubygems.org/gems/sinatra/versions.atom"
94
- },
95
- :padrino =>
96
- {
97
- :type => :web,
98
- :supported => ["~>0.10"],
99
- :url => "https://rubygems.org/gems/padrino",
100
- :feed => "https://rubygems.org/gems/padrino/versions.atom"
101
- },
102
- :rack =>
103
- {
104
- :type => :web,
105
- :supported => [">= 1.1.0"],
106
- :deprecated => ["~>1.0.0"],
107
- :url => "https://rubygems.org/gems/rack",
108
- :feed => "https://rubygems.org/gems/rack/versions.atom"
109
- },
110
- :grape =>
111
- {
112
- :type => :web,
113
- :supported => [">= 0.2.0"],
114
- :url => "https://rubygems.org/gems/grape",
115
- :feed => "https://rubygems.org/gems/grape/versions.atom"
116
- },
117
-
118
- # Database
119
- :activerecord =>
120
- {
121
- :type => :database,
122
- :supported => ["~>3.0.0", "~>3.1.0", "~>3.2.0", "~>4.0.0", "~>4.1.0", "~>4.2.0", "~>5.0.0", "~>5.1.0", "~>6.0.0"],
123
- :deprecated => ["~>2.0.0", "~>2.1.0", "~>2.2.0", "~>2.3.0",],
124
- :url => "https://rubygems.org/gems/activerecord",
125
- :feed => "https://rubygems.org/gems/activerecord/versions.atom",
126
- :notes => ["Last supported agent for ~>2.1.0, ~>2.2.0, and ~>2.3.0 was 3.18.1.330.",
127
- "Last supported agent for 2.0.x was 3.6.8.168."]
128
- },
129
- :datamapper =>
130
- {
131
- :type => :database,
132
- :supported => ["~>1.0"],
133
- :url => "https://rubygems.org/gems/datamapper",
134
- :feed => "https://rubygems.org/gems/datamapper/versions.atom"
135
- },
136
- :sequel =>
137
- {
138
- :type => :database,
139
- :supported => ["~>3.37", "~>4.0"],
140
- :url => "https://rubygems.org/gems/sequel",
141
- :feed => "https://rubygems.org/gems/sequel/versions.atom"
142
- },
143
- :mongo =>
144
- {
145
- :type => :database,
146
- :supported => ["~>1.8", "~>2.1"],
147
- :url => "https://rubygems.org/gems/mongo",
148
- :feed => "https://rubygems.org/gems/mongo/versions.atom"
149
- },
150
- :redis =>
151
- {
152
- :type => :database,
153
- :supported => ["~>3.0"],
154
- :url => "https://rubygems.org/gems/redis",
155
- :feed => "https://rubygems.org/gems/redis/versions.atom"
156
- },
157
-
158
- # Background Jobs
159
- :rake =>
160
- {
161
- :type => :background,
162
- :supported => ["~>10.0"],
163
- :url => "https://rubygems.org/gems/rake",
164
- :feed => "https://rubygems.org/gems/rake/versions.atom"
165
- },
166
- :resque =>
167
- {
168
- :type => :background,
169
- :supported => ["~>1.23.0"],
170
- :deprecated => ["~>1.22.0"],
171
- :experimental=> [">= 2.0"],
172
- :url => "https://rubygems.org/gems/resque",
173
- :feed => "https://rubygems.org/gems/resque/versions.atom"
174
- },
175
- :sidekiq =>
176
- {
177
- :type => :background,
178
- :supported => ["~>2.8", "~>3.4.2", "~>4.0"],
179
- :url => "https://rubygems.org/gems/sidekiq",
180
- :feed => "https://rubygems.org/gems/sidekiq/versions.atom"
181
- },
182
- :delayed_job =>
183
- {
184
- :type => :background,
185
- :supported => ["~>2.0", "~>3.0", "~>4.0"],
186
- :url => "https://rubygems.org/gems/delayed_job",
187
- :feed => "https://rubygems.org/gems/delayed_job/versions.atom"
188
- },
189
-
190
- # HTTP Clients
191
- :curb =>
192
- {
193
- :type => :http,
194
- :supported => [ ">= 0.8.1" ],
195
- :url => "https://rubygems.org/gems/curb",
196
- :feed => "https://rubygems.org/gems/curb/versions.atom"
197
- },
198
- :excon =>
199
- {
200
- :type => :http,
201
- :supported => [ ">= 0.10.1" ],
202
- :url => "https://rubygems.org/gems/excon",
203
- :feed => "https://rubygems.org/gems/excon/versions.atom"
204
- },
205
- :httpclient =>
206
- {
207
- :type => :http,
208
- :supported => [ ">= 2.2.0"],
209
- :url => "https://rubygems.org/gems/httpclient",
210
- :feed => "https://rubygems.org/gems/httpclient/versions.atom"
211
- },
212
- :typhoeus =>
213
- {
214
- :type => :http,
215
- :supported => [ ">= 0.5.3"],
216
- :url => "https://rubygems.org/gems/typhoeus",
217
- :feed => "https://rubygems.org/gems/typhoeus/versions.atom"
218
- },
219
- :net_http =>
220
- {
221
- :type => :http,
222
- :name => "Net::HTTP",
223
- :notes => [
224
- "Supported for all agent-supported versions of Ruby.",
225
- "For more information on supported HTTP clients see http://docs.newrelic.com/docs/ruby/ruby-http-clients."]
226
- },
227
- :httprb =>
228
- {
229
- :type => :http,
230
- :supported => [ ">= 0.9.9"],
231
- :url => "https://rubygems.org/gems/http",
232
- :feed => "https://rubygems.org/gems/http/versions.atom"
233
- },
234
-
235
- # Other
236
- :sunspot =>
237
- {
238
- :type => :other,
239
- :url => "https://rubygems.org/gems/sunspot",
240
- :feed => "https://rubygems.org/gems/sunspot/versions.atom"
241
- },
242
- :acts_as_solr =>
243
- {
244
- :type => :other,
245
- :url => "https://rubygems.org/gems/acts_as_solr",
246
- :feed => "https://rubygems.org/gems/acts_as_solr/versions.atom"
247
- },
248
- :dalli =>
249
- {
250
- :type => :other,
251
- :url => "https://rubygems.org/gems/dalli",
252
- :feed => "https://rubygems.org/gems/dalli/versions.atom"
253
- },
254
- :'memcache-client' =>
255
- {
256
- :type => :other,
257
- :url => "https://rubygems.org/gems/memcache-client",
258
- :feed => "https://rubygems.org/gems/memcache-client/versions.atom"
259
- },
260
- :authlogic =>
261
- {
262
- :type => :other,
263
- :url => "https://rubygems.org/gems/authlogic",
264
- :feed => "https://rubygems.org/gems/authlogic/versions.atom"
265
- },
266
- :activemerchant =>
267
- {
268
- :type => :other,
269
- :supported => [ ">= 1.25.0"],
270
- :url => "https://rubygems.org/gems/activemerchant",
271
- :feed => "https://rubygems.org/gems/activemerchant/versions.atom"
272
- },
273
- }
274
- end
275
- end
@@ -1,29 +0,0 @@
1
- # encoding: utf-8
2
- # This file is distributed under New Relic's license terms.
3
- # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
4
-
5
- module NewRelic
6
- class Control
7
- module Frameworks
8
- # Includes limited support for Merb
9
- class Merb < NewRelic::Control
10
-
11
- def env
12
- @env ||= ::Merb.env
13
- end
14
- def root
15
- ::Merb.root
16
- end
17
-
18
- def init_config options={}
19
- ::Merb::Plugins.add_rakefiles File.join(newrelic_root,"lib/tasks/all.rb")
20
-
21
- # Merb gives you a Merb::Plugins.config hash...feel free to put your stuff in your piece of it
22
- ::Merb::Plugins.config[:newrelic] = {
23
- :config => self
24
- }
25
- end
26
- end
27
- end
28
- end
29
- end