newrelic_rpm 3.16.2.321 → 3.16.3.323

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -14
  3. data/CHANGELOG +21 -1
  4. data/lib/new_relic/agent.rb +25 -10
  5. data/lib/new_relic/agent/agent.rb +3 -1
  6. data/lib/new_relic/agent/audit_logger.rb +1 -0
  7. data/lib/new_relic/agent/commands/thread_profiler_session.rb +1 -0
  8. data/lib/new_relic/agent/configuration/default_source.rb +8 -0
  9. data/lib/new_relic/agent/configuration/manager.rb +1 -1
  10. data/lib/new_relic/agent/error_collector.rb +5 -1
  11. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +59 -0
  12. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -1
  13. data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +3 -1
  14. data/lib/new_relic/agent/instrumentation/http.rb +36 -0
  15. data/lib/new_relic/agent/instrumentation/rack.rb +1 -1
  16. data/lib/new_relic/agent/new_relic_service/encoders.rb +1 -0
  17. data/lib/new_relic/agent/pipe_channel_manager.rb +1 -0
  18. data/lib/new_relic/agent/sampler.rb +7 -7
  19. data/lib/new_relic/agent/samplers/memory_sampler.rb +2 -0
  20. data/lib/new_relic/agent/supported_versions.rb +8 -1
  21. data/lib/new_relic/agent/threading/backtrace_service.rb +1 -0
  22. data/lib/new_relic/agent/transaction.rb +7 -4
  23. data/lib/new_relic/agent/transaction/attributes.rb +1 -0
  24. data/lib/new_relic/agent/transaction/trace_node.rb +5 -10
  25. data/lib/new_relic/agent/transaction_state.rb +1 -0
  26. data/lib/new_relic/agent/worker_loop.rb +3 -2
  27. data/lib/new_relic/cli/commands/deployments.rb +3 -0
  28. data/lib/new_relic/cli/commands/install.rb +2 -1
  29. data/lib/new_relic/control/frameworks/rails.rb +4 -4
  30. data/lib/new_relic/helper.rb +0 -4
  31. data/lib/new_relic/metric_data.rb +1 -0
  32. data/lib/new_relic/noticed_error.rb +2 -0
  33. data/lib/new_relic/version.rb +1 -1
  34. data/lib/tasks/config.rake +1 -1
  35. data/lib/tasks/tests.rake +1 -1
  36. data/lib/tasks/versions.rake +2 -2
  37. data/newrelic_rpm.gemspec +1 -1
  38. data/test/agent_helper.rb +5 -10
  39. data/test/fixtures/cross_agent_tests/docker_container_id/README.md +2 -2
  40. data/test/fixtures/cross_agent_tests/labels.json +71 -9
  41. data/test/fixtures/cross_agent_tests/rules.json +1 -1
  42. data/test/fixtures/cross_agent_tests/synthetics/README.md +2 -2
  43. data/test/fixtures/cross_agent_tests/synthetics/synthetics.json +5 -5
  44. data/test/multiverse/lib/multiverse/runner.rb +1 -1
  45. data/test/multiverse/suites/agent_only/labels_test.rb +1 -1
  46. data/test/multiverse/suites/agent_only/start_up_test.rb +11 -0
  47. data/test/multiverse/suites/httprb/Envfile +19 -0
  48. data/test/multiverse/suites/httprb/config/newrelic.yml +18 -0
  49. data/test/multiverse/suites/httprb/httprb_test.rb +78 -0
  50. data/test/multiverse/suites/rails/error_tracing_test.rb +19 -0
  51. data/test/new_relic/agent/agent_logger_test.rb +0 -14
  52. data/test/new_relic/agent/commands/thread_profiler_session_test.rb +1 -0
  53. data/test/new_relic/agent/configuration/manager_test.rb +3 -2
  54. data/test/new_relic/agent/error_collector_test.rb +27 -2
  55. data/test/new_relic/agent/instrumentation/middleware_proxy_test.rb +2 -3
  56. data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +2 -0
  57. data/test/new_relic/agent/method_tracer_test.rb +1 -0
  58. data/test/new_relic/agent/sampler_test.rb +2 -2
  59. data/test/new_relic/agent/synthetics_event_aggregator_test.rb +1 -0
  60. data/test/new_relic/agent/threading/backtrace_service_test.rb +8 -0
  61. data/test/new_relic/agent/transaction/trace_node_test.rb +4 -4
  62. data/test/new_relic/agent_test.rb +31 -0
  63. data/test/new_relic/cli/commands/deployments_test.rb +11 -6
  64. data/test/new_relic/control/class_methods_test.rb +5 -1
  65. data/test/performance/lib/performance/instrumentation/gc_stats.rb +1 -1
  66. data/test/performance/lib/performance/instrumentation/stackprof.rb +2 -2
  67. data/test/performance/lib/performance/platform.rb +1 -0
  68. data/test/performance/suites/active_record_subscriber.rb +100 -0
  69. data/ui/helpers/developer_mode_helper.rb +2 -1
  70. data/ui/helpers/google_pie_chart.rb +1 -0
  71. data/ui/views/newrelic/explain_sql.rhtml +1 -1
  72. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +1 -1
  73. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +1 -1
  74. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +1 -1
  75. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +1 -1
  76. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +1 -1
  77. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +1 -1
  78. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +1 -1
  79. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +1 -1
  80. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +1 -4
  81. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/middleware.rb +1 -2
  82. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/nested.rb +1 -2
  83. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +1 -1
  84. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +1 -1
  85. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +1 -1
  86. data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +1 -1
  87. metadata +8 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5fbd063ff6696e5f6ca06468d904efd894895f0
4
- data.tar.gz: ce04df3458e79da8fd0dcb30d5b5c5b9163013ca
3
+ metadata.gz: a8454965d0e8d1a99e35caacd91984db198aa5d7
4
+ data.tar.gz: 830bcd499e25cf38ee804c656788b29201510b6e
5
5
  SHA512:
6
- metadata.gz: 728c1d9a90c3dacd41feb973c580fe65ac6be12a6373601fcd016ffe80deeb42c35ef48ebeda9db851a1e6016295ee86dfce599a2c79ef3eb7b4157a107ec88c
7
- data.tar.gz: 7d16bb5da40a84b1ba4def5d9b7cafc82d65c0afe66b48d9b7ef6e37c1b1742c839e2b385d3ef7985ab72172c8ebb6966263837b0a29b37899a4b787ac8b78fe
6
+ metadata.gz: 4c62be289b6de4579c011a88fce9777cbd97f1fb3a4c14a0d6accfc9ef377d58520fd8fb3b256298f3d3615e19cc361f92af7e3d730d3b9de30938ffa019dc5f
7
+ data.tar.gz: 989d62082b606f370a55e9a898ae4b28ae1ddec04ad1c75ecff2a2ab77afde56da330523c5f2be566ae080a7eb5e7c091a41b26f881b95dadd99e72bee51cb41
@@ -5,7 +5,7 @@ services:
5
5
 
6
6
  language: ruby
7
7
 
8
- sudo: false
8
+ sudo: required
9
9
 
10
10
  script: ./test/script/ci.sh
11
11
 
@@ -13,7 +13,8 @@ before_install:
13
13
  - 'mkdir -p /home/travis/gemfiles && touch /home/travis/gemfiles/IGNORE.txt && cp -R /home/travis/gemfiles/* .'
14
14
  - 'if [[ `ruby --version` =~ ^ruby\ 1\. ]]; then gem update --system 1.8.25; fi'
15
15
  - gem --version
16
- - gem install bundler
16
+ # currently there's an incompatibility between Bundler 1.13 with JRuby 1.7, see Bundler issue #4975
17
+ - 'if [[ `ruby --version` =~ ^jruby\ 1\. ]]; then rvm use @global && gem uninstall -x bundler && gem install bundler -v 1.12.5; else gem install bundler; fi'
17
18
  - bundle --version
18
19
 
19
20
  install: bundle install --local --path=/home/travis/bundle || bundle --path=/home/travis/bundle
@@ -44,10 +45,10 @@ notifications:
44
45
  rvm:
45
46
  # Run slowest builds first to try and optimize overall cycle time.
46
47
  - jruby-1.7.23
47
- - jruby-9.0.4.0
48
+ - jruby-9.1.2.0
48
49
  - 2.3.1
49
50
  - 2.2.5
50
- - 2.1.8
51
+ - 2.1.10
51
52
  - 2.0.0-p648
52
53
  - 1.9.3
53
54
  - 1.9.2
@@ -115,13 +116,13 @@ matrix:
115
116
  env: TYPE=UNIT ENVIRONMENT=rails23
116
117
 
117
118
  # 2.1
118
- - rvm: 2.1.8
119
+ - rvm: 2.1.10
119
120
  env: TYPE=UNIT ENVIRONMENT=rails21
120
- - rvm: 2.1.8
121
+ - rvm: 2.1.10
121
122
  env: TYPE=UNIT ENVIRONMENT=rails22
122
- - rvm: 2.1.8
123
+ - rvm: 2.1.10
123
124
  env: TYPE=UNIT ENVIRONMENT=rails23
124
- - rvm: 2.1.8
125
+ - rvm: 2.1.10
125
126
  env: TYPE=UNIT ENVIRONMENT=rails50
126
127
 
127
128
  # 2.0
@@ -181,17 +182,17 @@ matrix:
181
182
  env: TYPE=UNIT ENVIRONMENT=rails50
182
183
 
183
184
  # jruby 9.0
184
- - rvm: jruby-9.0.4.0
185
+ - rvm: jruby-9.1.2.0
185
186
  env: TYPE=UNIT ENVIRONMENT=rails21
186
- - rvm: jruby-9.0.4.0
187
+ - rvm: jruby-9.1.2.0
187
188
  env: TYPE=UNIT ENVIRONMENT=rails22
188
- - rvm: jruby-9.0.4.0
189
+ - rvm: jruby-9.1.2.0
189
190
  env: TYPE=UNIT ENVIRONMENT=rails23
190
- - rvm: jruby-9.0.4.0
191
+ - rvm: jruby-9.1.2.0
191
192
  env: TYPE=UNIT ENVIRONMENT=rails30
192
- - rvm: jruby-9.0.4.0
193
+ - rvm: jruby-9.1.2.0
193
194
  env: TYPE=UNIT ENVIRONMENT=rails31
194
- - rvm: jruby-9.0.4.0
195
+ - rvm: jruby-9.1.2.0
195
196
  env: TYPE=UNIT ENVIRONMENT=rails32
196
197
 
197
198
  # rbx
data/CHANGELOG CHANGED
@@ -1,5 +1,25 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v3.16.3 ##
4
+
5
+ * Add `:trace_only` option to `notice_error` API
6
+
7
+ Previously, calling `notice_error` would record the trace, increment the
8
+ error count, and consider the transaction failing for Apdex purposes. This
9
+ method now accepts a `:trace_only` boolean option which, if true, will only
10
+ record the trace and not affect the error count or transaction.
11
+
12
+ * HTTP.rb support
13
+
14
+ The agent has been updated to add instrumentation support for the HTTP gem,
15
+ including Cross Application Tracing. Thanks Tiago Sousa for the contribution!
16
+
17
+ * Prevent redundant Delayed::Job instrumentation installation
18
+
19
+ This change was to handle situations where multiple Delayed::Worker instances
20
+ are being created but Delayed::Job has already been instrumented. Thanks Tony
21
+ Brown for the contribution!
22
+
3
23
  ## v3.16.2 ##
4
24
 
5
25
  * Fix for "Unexpected frame in traced method stack" errors
@@ -43,7 +63,7 @@
43
63
  adapter name, and Postmodern expanded our coverage. Thanks for the
44
64
  contribution!
45
65
 
46
- ## v3.16.0
66
+ ## v3.16.0 ##
47
67
 
48
68
  * Official Rails 5.0 support
49
69
 
@@ -210,16 +210,31 @@ module NewRelic
210
210
  end
211
211
  end
212
212
 
213
- # Notice the error with the given available options:
214
- #
215
- # * <tt>:uri</tt> => Request path, minus request params or query string
216
- # * <tt>:metric</tt> => The metric name associated with the transaction
217
- # * <tt>:custom_params</tt> => Custom parameters
218
- #
219
- # Previous versions of the agent allowed passing :request_params but
220
- # those are now ignored. Associate the request with the enclosing
221
- # transaction, or record additional information as custom attributes.
222
- # Anything left over is treated as custom params.
213
+ # Send an error to New Relic.
214
+ #
215
+ # @param [Exception] exception Error you wish to send
216
+ # @param [Hash] options Modify how New Relic processes the error
217
+ # @option options [Hash] :custom_params Custom parameters to attach to the trace
218
+ # @option options [Boolean] :trace_only Only record the error trace
219
+ # (do not affect error rate or Apdex status)
220
+ # @option options [String] :uri Request path, minus request params or query string
221
+ # (usually not needed)
222
+ # @option options [String] :metric Metric name associated with the transaction
223
+ # (usually not needed)
224
+ #
225
+ # Any option keys other than the ones listed here are treated as
226
+ # <code>:custom_params</code>.
227
+ #
228
+ # *Note:* Previous versions of the agent allowed passing
229
+ # <code>:request_params</code>, but those are now ignored. If you
230
+ # need to record the request parameters, call this method inside a
231
+ # transaction or pass the information in
232
+ # <code>:custom_params</code>.
233
+ #
234
+ # Most of the time, you do not need to specify the
235
+ # <code>:uri</code> or <code>:metric</code> options; only pass
236
+ # them if you are calling <code>notice_error</code> outside a
237
+ # transaction.
223
238
  #
224
239
  # @api public
225
240
  #
@@ -71,6 +71,8 @@ module NewRelic
71
71
  @connect_state = :pending
72
72
  @connect_attempts = 0
73
73
  @environment_report = nil
74
+ @waited_on_connect = nil
75
+ @connected_pid = nil
74
76
 
75
77
  @wait_on_connect_reader, @wait_on_connect_writer = IO.pipe
76
78
 
@@ -472,7 +474,7 @@ module NewRelic
472
474
  end
473
475
 
474
476
  def in_resque_child_process?
475
- @service.is_a?(NewRelic::Agent::PipeService)
477
+ defined?(@service) && @service.is_a?(NewRelic::Agent::PipeService)
476
478
  end
477
479
 
478
480
  # Sanity-check the agent configuration and start the agent,
@@ -13,6 +13,7 @@ module NewRelic
13
13
  @enabled = NewRelic::Agent.config[:'audit_log.enabled']
14
14
  @endpoints = NewRelic::Agent.config[:'audit_log.endpoints']
15
15
  @encoder = NewRelic::Agent::NewRelicService::Encoders::Identity
16
+ @log = nil
16
17
  end
17
18
 
18
19
  attr_writer :enabled
@@ -16,6 +16,7 @@ module NewRelic
16
16
  @backtrace_service = backtrace_service
17
17
  @started_at = nil
18
18
  @finished_profile = nil
19
+ @profile = nil
19
20
  end
20
21
 
21
22
  def handle_start_command(agent_command)
@@ -1326,6 +1326,14 @@ module NewRelic
1326
1326
  :allowed_from_server => false,
1327
1327
  :description => 'If <code>true</code>, the agent won\'t install instrumentation for the typhoeus gem.'
1328
1328
  },
1329
+ :disable_httprb => {
1330
+ :default => false,
1331
+ :public => true,
1332
+ :type => Boolean,
1333
+ :dynamic_name => true,
1334
+ :allowed_from_server => false,
1335
+ :description => 'If <code>true</code>, the agent won\'t install instrumentation for the http.rb gem.'
1336
+ },
1329
1337
  :disable_middleware_instrumentation => {
1330
1338
  :default => false,
1331
1339
  :public => true,
@@ -245,7 +245,7 @@ module NewRelic
245
245
  end
246
246
 
247
247
  def break_label_string_into_pairs(labels)
248
- stripped_labels = labels.strip
248
+ stripped_labels = labels.strip.sub(/^;*/,'').sub(/;*$/,'')
249
249
  stripped_labels.split(';').map do |pair|
250
250
  pair.split(':').map(&:strip)
251
251
  end
@@ -196,7 +196,11 @@ module NewRelic
196
196
  tag_exception(exception)
197
197
 
198
198
  state = ::NewRelic::Agent::TransactionState.tl_get
199
- increment_error_count!(state, exception, options)
199
+
200
+ unless options.delete(:trace_only)
201
+ increment_error_count!(state, exception, options)
202
+ end
203
+
200
204
  noticed_error = create_noticed_error(exception, options)
201
205
  error_trace_aggregator.add_to_error_queue(noticed_error)
202
206
  payload = state.current_transaction ? state.current_transaction.payload : nil
@@ -0,0 +1,59 @@
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
+ module NewRelic
6
+ module Agent
7
+ module HTTPClients
8
+ class HTTPResponse
9
+ attr_reader :response
10
+
11
+ def initialize(response)
12
+ @response = response
13
+ end
14
+
15
+ def [](key)
16
+ _, value = response.headers.find { |k,_| key.downcase == k.downcase }
17
+ value unless value.nil?
18
+ end
19
+
20
+ def to_hash
21
+ response.headers
22
+ end
23
+ end
24
+
25
+ class HTTPRequest
26
+ attr_reader :request, :uri
27
+
28
+ def initialize(request)
29
+ @request = request
30
+ @uri = request.uri
31
+ end
32
+
33
+ def type
34
+ "http.rb"
35
+ end
36
+
37
+ def host
38
+ if hostname = self['host']
39
+ hostname.split(':').first
40
+ else
41
+ request.host
42
+ end
43
+ end
44
+
45
+ def method
46
+ request.verb.upcase
47
+ end
48
+
49
+ def [](key)
50
+ request.headers[key]
51
+ end
52
+
53
+ def []=(key, value)
54
+ request.headers[key] = value
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -99,7 +99,7 @@ module NewRelic
99
99
  end
100
100
 
101
101
  def newrelic_read_attr(attr_name) # :nodoc:
102
- instance_variable_get(attr_name)
102
+ instance_variable_get(attr_name) if instance_variable_defined?(attr_name)
103
103
  end
104
104
 
105
105
  # Add transaction tracing to the given method. This will treat
@@ -97,7 +97,9 @@ DependencyDetection.defer do
97
97
  end
98
98
  NewRelic::DelayedJobInjection.worker_name = worker_name
99
99
 
100
- if defined?(::Delayed::Job) && ::Delayed::Job.method_defined?(:invoke_job)
100
+ if defined?(::Delayed::Job) && ::Delayed::Job.method_defined?(:invoke_job) &&
101
+ !(::Delayed::Job.method_defined?(:invoke_job_without_new_relic) )
102
+
101
103
  ::NewRelic::Agent.logger.info 'Installing DelayedJob instrumentation [part 2/2]'
102
104
  install_newrelic_job_tracer
103
105
  NewRelic::Control.instance.init_plugin :dispatcher => :delayed_job
@@ -0,0 +1,36 @@
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
+ DependencyDetection.defer do
6
+ named :httprb
7
+
8
+ depends_on do
9
+ defined?(HTTP) && defined?(HTTP::Client)
10
+ end
11
+
12
+ executes do
13
+ ::NewRelic::Agent.logger.info 'Installing http.rb instrumentation'
14
+ require 'new_relic/agent/cross_app_tracing'
15
+ require 'new_relic/agent/http_clients/http_rb_wrappers'
16
+ end
17
+
18
+ executes do
19
+ class HTTP::Client
20
+ def perform_with_newrelic_trace(request, options)
21
+ wrapped_request = ::NewRelic::Agent::HTTPClients::HTTPRequest.new(request)
22
+
23
+ response = nil
24
+ ::NewRelic::Agent::CrossAppTracing.tl_trace_http_request(wrapped_request) do
25
+ response = perform_without_newrelic_trace(request, options)
26
+ ::NewRelic::Agent::HTTPClients::HTTPResponse.new(response)
27
+ end
28
+
29
+ response
30
+ end
31
+
32
+ alias perform_without_newrelic_trace perform
33
+ alias perform perform_with_newrelic_trace
34
+ end
35
+ end
36
+ end
@@ -79,7 +79,7 @@ module NewRelic
79
79
  end
80
80
 
81
81
  def self.check_for_late_instrumentation(app)
82
- return if @checked_for_late_instrumentation
82
+ return if defined?(@checked_for_late_instrumentation) && @checked_for_late_instrumentation
83
83
  @checked_for_late_instrumentation = true
84
84
  if middleware_instrumentation_enabled?
85
85
  if ::NewRelic::Agent::Instrumentation::MiddlewareProxy.needs_wrapping?(app)
@@ -31,6 +31,7 @@ module NewRelic
31
31
  output.set_encoding BINARY
32
32
  gz = Zlib::GzipWriter.new(output, Zlib::DEFAULT_COMPRESSION, Zlib::DEFAULT_STRATEGY)
33
33
  gz.write(data)
34
+ gz.close
34
35
  output.rewind
35
36
  output.string
36
37
  end
@@ -139,6 +139,7 @@ module NewRelic
139
139
  attr_accessor :pipes, :timeout, :select_timeout
140
140
 
141
141
  def initialize
142
+ @started = nil
142
143
  @pipes = {}
143
144
  @pipes_lock = Mutex.new
144
145
 
@@ -19,12 +19,12 @@ module NewRelic
19
19
  attr_reader :id
20
20
  @sampler_classes = []
21
21
 
22
- def self.named(new_name)
23
- @name = new_name
22
+ class << self
23
+ attr_reader :shorthand_name
24
24
  end
25
25
 
26
- def self.name
27
- @name
26
+ def self.named(new_name)
27
+ @shorthand_name = new_name
28
28
  end
29
29
 
30
30
  def self.inherited(subclass)
@@ -37,8 +37,8 @@ module NewRelic
37
37
  end
38
38
 
39
39
  def self.enabled?
40
- if @name
41
- config_key = "disable_#{@name}_sampler"
40
+ if shorthand_name
41
+ config_key = "disable_#{shorthand_name}_sampler"
42
42
  !(Agent.config[config_key])
43
43
  else
44
44
  true
@@ -53,7 +53,7 @@ module NewRelic
53
53
  # we have clients who are defining their own subclasses of this class, and
54
54
  # expecting to be able to call super with an ID.
55
55
  def initialize(id=nil)
56
- @id = id || self.class.name
56
+ @id = id || self.class.shorthand_name
57
57
  end
58
58
 
59
59
  def poll
@@ -14,6 +14,8 @@ module NewRelic
14
14
  attr_accessor :sampler
15
15
 
16
16
  def initialize
17
+ @sampler = nil
18
+
17
19
  # macos, linux, solaris
18
20
  if defined? JRuby
19
21
  @sampler = JavaHeapSampler.new
@@ -23,7 +23,7 @@ module NewRelic
23
23
  {
24
24
  :type => :ruby,
25
25
  :name => "JRuby",
26
- :supported => ["~> 1.6.0", "~> 1.7.0", "~> 9.0"],
26
+ :supported => ["~> 1.7.0", "~> 9.0", "~> 9.1"],
27
27
  :url => "http://jruby.org",
28
28
  :feed => "http://jruby.org/atom.xml"
29
29
  },
@@ -229,6 +229,13 @@ module NewRelic
229
229
  "Supported for all agent-supported versions of Ruby.",
230
230
  "For more information on supported HTTP clients see http://docs.newrelic.com/docs/ruby/ruby-http-clients."]
231
231
  },
232
+ :httprb =>
233
+ {
234
+ :type => :http,
235
+ :supported => [ ">= 0.9.9"],
236
+ :url => "https://rubygems.org/gems/http",
237
+ :feed => "https://rubygems.org/gems/http/versions.atom"
238
+ },
232
239
 
233
240
  # Other
234
241
  :sunspot =>