newrelic_plugin 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,12 @@
4
4
 
5
5
  **Features**
6
6
 
7
+ ### v1.3.0 - October 3, 2013 ###
8
+
9
+ **Changes**
10
+
11
+ * Stop sending components that did not collect any data for the poll cycle.
12
+ * Output stacktrace for errors that occur in the agents poll cycle code.
7
13
 
8
14
  ### v1.2.1 - September 10, 2013 ###
9
15
 
@@ -1,4 +1,4 @@
1
- require 'newrelic_platform_binding/logger'
1
+ require 'newrelic_platform_binding/platform_logger'
2
2
  require 'newrelic_platform_binding/config'
3
3
  require 'newrelic_platform_binding/request'
4
4
  require 'newrelic_platform_binding/context'
@@ -4,7 +4,7 @@ module NewRelic
4
4
  def self.endpoint=(url)
5
5
  @endpoint = url
6
6
  if self.use_ssl? and !self.ssl_supported?
7
- Logger.warn('Using SSL is not recommended when using Ruby versions below 1.9')
7
+ PlatformLogger.warn('Using SSL is not recommended when using Ruby versions below 1.9')
8
8
  end
9
9
  end
10
10
 
@@ -24,7 +24,7 @@ module NewRelic
24
24
  @endpoint = 'https://platform-api.newrelic.com'
25
25
  else
26
26
  @endpoint = 'http://platform-api.newrelic.com'
27
- Logger.warn('SSL is disabled by default when using Ruby 1.8.x')
27
+ PlatformLogger.warn('SSL is disabled by default when using Ruby 1.8.x')
28
28
  end
29
29
  @uri = '/platform/v1/metrics'
30
30
  @ssl_host_verification = true
@@ -15,7 +15,7 @@ module NewRelic
15
15
 
16
16
  def send_request(data)
17
17
  begin
18
- Logger.debug("JSON payload: #{data}")
18
+ PlatformLogger.debug("JSON payload: #{data}")
19
19
  uri = URI.parse(url)
20
20
  if Config.proxy.nil?
21
21
  http = Net::HTTP.new(uri.host, uri.port)
@@ -36,10 +36,10 @@ module NewRelic
36
36
  response = http.request(request)
37
37
  return evaluate_response(response)
38
38
  rescue Timeout::Error => err
39
- Logger.warn "Connection Timeout Error: #{err.inspect} #{err.message}"
39
+ PlatformLogger.warn "Connection Timeout Error: #{err.inspect} #{err.message}"
40
40
  return false
41
41
  rescue => err
42
- Logger.warn "HTTP Connection Error: #{err.inspect} #{err.message}"
42
+ PlatformLogger.warn "HTTP Connection Error: #{err.inspect} #{err.message}"
43
43
  return false
44
44
  end
45
45
  end
@@ -57,7 +57,7 @@ module NewRelic
57
57
  return_status = "FAILED[#{response.code}] <#{url}>: #{last_result["error"]}"
58
58
  end
59
59
  elsif response && response.code == '403' && response.body == "DISABLE_NEW_RELIC"
60
- Logger.fatal "Agent has been disabled remotely by New Relic"
60
+ PlatformLogger.fatal "Agent has been disabled remotely by New Relic"
61
61
  abort "Agent has been disabled remotely by New Relic"
62
62
  else
63
63
  if response.body.size > 0
@@ -72,9 +72,9 @@ module NewRelic
72
72
  end
73
73
  if return_status
74
74
  if response and response.code == '503'
75
- Logger.warn("Collector temporarily unavailable. Continuing.")
75
+ PlatformLogger.warn("Collector temporarily unavailable. Continuing.")
76
76
  else
77
- Logger.error("#{return_status}")
77
+ PlatformLogger.error("#{return_status}")
78
78
  end
79
79
  end
80
80
 
@@ -21,6 +21,16 @@ module NewRelic
21
21
  return component
22
22
  end
23
23
 
24
+ def get_component(name, guid)
25
+ component = find_component(name, guid)
26
+ component = create_component(name, guid) if component.nil?
27
+ component
28
+ end
29
+
30
+ def find_component(name, guid)
31
+ @components.find { |c| c.key == name + guid }
32
+ end
33
+
24
34
  def get_request()
25
35
  if past_aggregation_limit?
26
36
  @components.each do |component|
@@ -15,7 +15,7 @@ module NewRelic
15
15
  @max = options[:max].to_f
16
16
  @sum_of_squares = options[:sum_of_squares].to_f
17
17
  else
18
- Logger.warn("Metric #{@name} count, min, max, and sum_of_squares are all required if one is set, falling back to value only") unless options.size == 0
18
+ PlatformLogger.warn("Metric #{@name} count, min, max, and sum_of_squares are all required if one is set, falling back to value only") unless options.size == 0
19
19
  @count = 1
20
20
  @min = value
21
21
  @max = value
@@ -2,7 +2,7 @@ module NewRelic
2
2
  require 'time'
3
3
  require 'logger'
4
4
 
5
- class Logger
5
+ class PlatformLogger
6
6
  @log = ::Logger.new(STDOUT)
7
7
  @log.level = ::Logger::WARN
8
8
  @log.formatter = proc { |severity, datetime, progname, msg| "[#{Time.iso8601(Time.now.utc.iso8601).to_s}] #{severity}: #{msg}\n" }
@@ -26,7 +26,7 @@ module NewRelic
26
26
  component.last_delivered_at = delivered_at
27
27
  end
28
28
  end
29
- Logger.warn("Duration of more than 10 minutes between sending data to New Relic, this will cause plugins to show up as not reporting") if duration_warning
29
+ PlatformLogger.warn("Duration of more than 10 minutes between sending data to New Relic, this will cause plugins to show up as not reporting") if duration_warning
30
30
  end
31
31
  end
32
32
 
@@ -82,25 +82,33 @@ module NewRelic
82
82
  def build_components_array
83
83
  components_array = []
84
84
  @context.components.each do |component|
85
- component_hash = {
86
- 'name' => component.name,
87
- 'guid' => component.guid,
88
- 'duration' => component.duration,
89
- 'metrics' => build_metrics_hash(component)
90
- }
91
- components_array.push(component_hash)
85
+ if component_has_metrics?(component)
86
+ component_hash = {
87
+ 'name' => component.name,
88
+ 'guid' => component.guid,
89
+ 'duration' => component.duration,
90
+ 'metrics' => build_metrics_hash(component)
91
+ }
92
+ components_array.push(component_hash)
93
+ else
94
+ PlatformLogger.debug("Component with name \"#{component.name}\" and guid \"#{component.guid}\" had no metrics")
95
+ end
92
96
  end
93
97
  return components_array
94
98
  end
95
99
 
100
+ def component_has_metrics?(component)
101
+ @metrics.has_key?(component.key) && @metrics[component.key].size > 0
102
+ end
103
+
96
104
  def build_metrics_hash(component)
97
105
  metrics_hash = {}
98
- if @metrics.has_key?(component.key)
106
+ if component_has_metrics?(component)
99
107
  @metrics[component.key].each do |metric|
100
108
  metrics_hash.merge!(metric.to_hash)
101
109
  end
102
110
  else
103
- Logger.warn("Component with name \"#{component.name}\" and guid \"#{component.guid}\" had no metrics")
111
+ PlatformLogger.warn("Component with name \"#{component.name}\" and guid \"#{component.guid}\" had no metrics")
104
112
  end
105
113
  metrics_hash
106
114
  end
@@ -15,8 +15,8 @@ module NewRelic::Processor
15
15
  #
16
16
  class Rate < NewRelic::Plugin::Processor::Base
17
17
  def initialize
18
- Logger.warn("OBSOLESCENCE WARNING: The 'Rate' processor is obsolete and should not be used.")
19
- Logger.warn("OBSOLESCENCE WARNING: It will be completely removed in the near future.")
18
+ PlatformLogger.warn("OBSOLESCENCE WARNING: The 'Rate' processor is obsolete and should not be used.")
19
+ PlatformLogger.warn("OBSOLESCENCE WARNING: It will be completely removed in the near future.")
20
20
  super :rate,"Rate"
21
21
  end
22
22
  def process val
@@ -25,40 +25,40 @@ module NewRelic
25
25
 
26
26
  def configuration_and_logging
27
27
  if @config.newrelic["verbose"].to_i > 0
28
- NewRelic::Logger.log_level = ::Logger::DEBUG
28
+ NewRelic::PlatformLogger.log_level = ::Logger::DEBUG
29
29
  end
30
- Logger.info("Using Ruby SDK version: #{NewRelic::Plugin::VERSION}")
30
+ PlatformLogger.info("Using Ruby SDK version: #{NewRelic::Plugin::VERSION}")
31
31
 
32
32
  if @config.newrelic['endpoint']
33
33
  NewRelic::Binding::Config.endpoint = @config.newrelic['endpoint']
34
- Logger.info("Using alternate endpoint: #{NewRelic::Binding::Config.endpoint}")
34
+ PlatformLogger.info("Using alternate endpoint: #{NewRelic::Binding::Config.endpoint}")
35
35
  end
36
36
 
37
37
  unless @config.newrelic['ssl_host_verification'].nil?
38
38
  NewRelic::Binding::Config.ssl_host_verification = !!@config.newrelic['ssl_host_verification']
39
- Logger.info("Disabling ssl host verification") unless NewRelic::Binding::Config.ssl_host_verification
39
+ PlatformLogger.info("Disabling ssl host verification") unless NewRelic::Binding::Config.ssl_host_verification
40
40
  end
41
41
 
42
42
  if @config.newrelic['proxy']
43
43
  NewRelic::Binding::Config.proxy = @config.newrelic['proxy']
44
- Logger.info("Using a proxy: #{NewRelic::Binding::Config.proxy.inspect}")
44
+ PlatformLogger.info("Using a proxy: #{NewRelic::Binding::Config.proxy.inspect}")
45
45
  end
46
46
 
47
47
  @poll_cycle_period = (@config.newrelic["poll"] || 60).to_i
48
48
  NewRelic::Binding::Config.poll_cycle_period = @poll_cycle_period
49
49
  if @poll_cycle_period <= 0
50
50
  message = "A poll cycle period less than or equal to 0 is invalid"
51
- Logger.fatal(message)
51
+ PlatformLogger.fatal(message)
52
52
  abort message
53
53
  end
54
54
  if @poll_cycle_period != 60
55
- Logger.warn("WARNING: Poll cycle period differs from 60 seconds (current is #{@poll_cycle_period})")
55
+ PlatformLogger.warn("WARNING: Poll cycle period differs from 60 seconds (current is #{@poll_cycle_period})")
56
56
  end
57
57
  end
58
58
 
59
59
  def installed_agents
60
60
  if Setup.installed_agents.size == 0
61
- Logger.error("No agents installed!")
61
+ PlatformLogger.error("No agents installed!")
62
62
  raise NoAgents, "No agents installed"
63
63
  end
64
64
  Setup.installed_agents
@@ -100,12 +100,12 @@ module NewRelic
100
100
  if configured_agents.size == 0
101
101
  err_msg = "No agents configured!"
102
102
  err_msg += " Check the agents portion of your yml file." unless NewRelic::Plugin::Config.config.options.empty?
103
- Logger.error(err_msg)
103
+ PlatformLogger.error(err_msg)
104
104
  raise NoAgents, err_msg
105
105
  end
106
106
  installed_agents.each do |agent_id,installed_agent|
107
107
  version = installed_agent[:agent_class].version
108
- Logger.info("Agent #{installed_agent[:label]} is at version #{version}") if version
108
+ PlatformLogger.info("Agent #{installed_agent[:label]} is at version #{version}") if version
109
109
  end
110
110
  configured_agents.each do |agent|
111
111
  agent.startup if agent.respond_to? :startup
@@ -126,33 +126,34 @@ module NewRelic
126
126
  request = @context.get_request()
127
127
  run_agent_data_collection(request)
128
128
  request.deliver
129
- Logger.info("Gathered #{request.metric_count} statistics from #{request.component_count} components")
129
+ PlatformLogger.info("Gathered #{request.metric_count} statistics from #{request.component_count} components")
130
130
 
131
131
  seconds_to_delay = @poll_cycle_period - (Time.now - @last_run_time)
132
132
  sleep(seconds_to_delay) if seconds_to_delay > 0
133
133
  end
134
134
  rescue Interrupt => err
135
- Logger.info "Shutting down..."
135
+ PlatformLogger.info "Shutting down..."
136
136
  end
137
137
  end
138
138
 
139
139
  def run_agent_data_collection(request)
140
- Logger.debug('Start collecting agent data for poll cycle')
140
+ PlatformLogger.debug('Start collecting agent data for poll cycle')
141
141
  configured_agents.each do |agent|
142
142
  begin
143
143
  agent.run(request)
144
144
  rescue => err
145
- Logger.error("Error occurred in poll cycle: #{err}")
145
+ PlatformLogger.error("Error occurred in poll cycle: #{err}")
146
+ PlatformLogger.debug("Stacktrace:\n#{err.backtrace.join("\n")}")
146
147
  end
147
148
  end
148
- Logger.debug('Finished collecting agent data for poll cycle')
149
+ PlatformLogger.debug('Finished collecting agent data for poll cycle')
149
150
  end
150
151
 
151
152
  def agent_shutdown
152
153
  configured_agents.each do |agent|
153
154
  agent.shutdown if agent.respond_to? :shutdown
154
155
  end
155
- Logger.info("Shutdown complete")
156
+ PlatformLogger.info("Shutdown complete")
156
157
  end
157
158
 
158
159
  def agent_setup
@@ -1,5 +1,5 @@
1
1
  module NewRelic
2
2
  module Plugin
3
- VERSION = "1.2.1"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
@@ -47,9 +47,9 @@ class ConfigTest < Minitest::Test
47
47
  def test_set_ssl_endpoint
48
48
  new_endpoint = 'https://example.com'
49
49
  if NewRelic::Binding::Config.ssl_supported?
50
- NewRelic::Logger.expects(:warn).with('Using SSL is not recommended when using Ruby versions below 1.9').never
50
+ NewRelic::PlatformLogger.expects(:warn).with('Using SSL is not recommended when using Ruby versions below 1.9').never
51
51
  else
52
- NewRelic::Logger.expects(:warn).with('Using SSL is not recommended when using Ruby versions below 1.9')
52
+ NewRelic::PlatformLogger.expects(:warn).with('Using SSL is not recommended when using Ruby versions below 1.9')
53
53
  end
54
54
  NewRelic::Binding::Config.endpoint = new_endpoint
55
55
  assert_equal new_endpoint, NewRelic::Binding::Config.endpoint
@@ -21,46 +21,46 @@ class ConnectionTest < Minitest::Test
21
21
 
22
22
  def test_deliver_error_codes
23
23
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => '{"error":"Missing metric data"}', :status => [200, "Success"])
24
- NewRelic::Logger.expects(:error).with("FAILED[200] <#{@endpoint}/platform/v1/metrics>: Missing metric data")
24
+ NewRelic::PlatformLogger.expects(:error).with("FAILED[200] <#{@endpoint}/platform/v1/metrics>: Missing metric data")
25
25
  assert_equal false, @connection.send_request('data')
26
26
  end
27
27
 
28
28
  def test_deliver_disabled_by_new_relic
29
29
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => 'DISABLE_NEW_RELIC', :status => [403, 'Unauthorized'])
30
- NewRelic::Logger.expects(:fatal).with("Agent has been disabled remotely by New Relic")
30
+ NewRelic::PlatformLogger.expects(:fatal).with("Agent has been disabled remotely by New Relic")
31
31
  NewRelic::Binding::Connection.any_instance.expects(:abort)
32
32
  @connection.send_request('data')
33
33
  end
34
34
 
35
35
  def test_deliver_no_response
36
36
  Net::HTTP.any_instance.expects(:request).returns(nil)
37
- NewRelic::Logger.expects(:error).with("FAILED: No response")
37
+ NewRelic::PlatformLogger.expects(:error).with("FAILED: No response")
38
38
  assert_equal false, @connection.send_request('data')
39
39
  end
40
40
 
41
41
  def test_deliver_no_data_returned
42
42
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => '', :status => [204, "No Content"])
43
- NewRelic::Logger.expects(:error).with("FAILED[204] <#{@endpoint}/platform/v1/metrics>: no data returned")
43
+ NewRelic::PlatformLogger.expects(:error).with("FAILED[204] <#{@endpoint}/platform/v1/metrics>: no data returned")
44
44
  assert_equal false, @connection.send_request('data')
45
45
  end
46
46
 
47
47
  def test_deliver_non_json_response_body_unexpected_response_code
48
48
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => 'test', :status => [203, "Non-Authoritative Information"])
49
49
  JSON::ParserError.any_instance.stubs(:message => 'parse error')
50
- NewRelic::Logger.expects(:error).with("FAILED[203] <#{@endpoint}/platform/v1/metrics>: Could not parse response: parse error")
50
+ NewRelic::PlatformLogger.expects(:error).with("FAILED[203] <#{@endpoint}/platform/v1/metrics>: Could not parse response: parse error")
51
51
  assert_equal false, @connection.send_request('data')
52
52
  end
53
53
 
54
54
  def test_deliver_non_json_response_body_success_response_code
55
55
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => 'test', :status => [200, "Success"])
56
56
  JSON::ParserError.any_instance.stubs(:message => 'parse error')
57
- NewRelic::Logger.expects(:error).with("FAILED[200] <#{@endpoint}/platform/v1/metrics>: Could not parse response: parse error")
57
+ NewRelic::PlatformLogger.expects(:error).with("FAILED[200] <#{@endpoint}/platform/v1/metrics>: Could not parse response: parse error")
58
58
  assert_equal false, @connection.send_request('data')
59
59
  end
60
60
 
61
61
  def test_deliver_service_unavailable
62
62
  FakeWeb.register_uri(:post, "#{@endpoint}/platform/v1/metrics", :body => 'test', :status => [503, "Service Unavailable"])
63
- NewRelic::Logger.expects(:warn).with("Collector temporarily unavailable. Continuing.")
63
+ NewRelic::PlatformLogger.expects(:warn).with("Collector temporarily unavailable. Continuing.")
64
64
  assert_equal false, @connection.send_request('data')
65
65
  end
66
66
 
@@ -11,7 +11,7 @@ class MetricTest < Minitest::Test
11
11
  end
12
12
 
13
13
  def test_initialize_without_options_does_not_trigger_options_warning
14
- NewRelic::Logger.expects(:warn).never
14
+ NewRelic::PlatformLogger.expects(:warn).never
15
15
  NewRelic::Binding::Metric.new(@component, 'Component/Test/rate[units]', '10')
16
16
  end
17
17
 
@@ -36,22 +36,22 @@ class MetricTest < Minitest::Test
36
36
  end
37
37
 
38
38
  def test_count_with_only_count_option_set
39
- NewRelic::Logger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
39
+ NewRelic::PlatformLogger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
40
40
  assert_equal 1, initialize_metric(:count => 2).count
41
41
  end
42
42
 
43
43
  def test_min_with_only_min_option_set
44
- NewRelic::Logger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
44
+ NewRelic::PlatformLogger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
45
45
  assert_equal 10, initialize_metric(:min => 5).min
46
46
  end
47
47
 
48
48
  def test_max_with_only_max_option_set
49
- NewRelic::Logger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
49
+ NewRelic::PlatformLogger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
50
50
  assert_equal 10, initialize_metric(:max => 15).max
51
51
  end
52
52
 
53
53
  def test_sum_of_squares_with_only_sum_of_squares_option_set
54
- NewRelic::Logger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
54
+ NewRelic::PlatformLogger.expects(:warn).with('Metric Component/Test/rate[units] count, min, max, and sum_of_squares are all required if one is set, falling back to value only')
55
55
  assert_equal 100, initialize_metric(:sum_of_squares => 400).sum_of_squares
56
56
  end
57
57
 
@@ -1,33 +1,33 @@
1
1
  require 'test_helper'
2
2
 
3
- class LoggerTest < Minitest::Test
3
+ class PlatformLoggerTest < Minitest::Test
4
4
 
5
5
  def setup
6
- @log = NewRelic::Logger.instance_variable_get(:@log)
6
+ @log = NewRelic::PlatformLogger.instance_variable_get(:@log)
7
7
  end
8
8
 
9
9
  def test_debug_calls_log_debug
10
10
  @log.expects(:debug).with('test')
11
- NewRelic::Logger.debug('test')
11
+ NewRelic::PlatformLogger.debug('test')
12
12
  end
13
13
 
14
14
  def test_info_calls_log_info
15
15
  @log.expects(:info).with('test')
16
- NewRelic::Logger.info('test')
16
+ NewRelic::PlatformLogger.info('test')
17
17
  end
18
18
 
19
19
  def test_warn_calls_log_warn
20
20
  @log.expects(:warn).with('test')
21
- NewRelic::Logger.warn('test')
21
+ NewRelic::PlatformLogger.warn('test')
22
22
  end
23
23
 
24
24
  def test_error_calls_log_error
25
25
  @log.expects(:error).with('test')
26
- NewRelic::Logger.error('test')
26
+ NewRelic::PlatformLogger.error('test')
27
27
  end
28
28
 
29
29
  def test_fatal_calls_log_fatal
30
30
  @log.expects(:fatal).with('test')
31
- NewRelic::Logger.fatal('test')
31
+ NewRelic::PlatformLogger.fatal('test')
32
32
  end
33
33
  end
@@ -71,9 +71,17 @@ class RequestTest < Minitest::Test
71
71
  assert_equal example_hash, @request.send(:build_request_data_structure)
72
72
  end
73
73
 
74
+ def test_build_request_data_structure_does_not_include_components_without_metrics
75
+ metric_setup
76
+ second_component = @context.create_component('name2', 'com.test')
77
+ @request.add_metric(@component, 'Component/test/first[units]', 1)
78
+ @request.add_metric(@component, 'Component/test/second[units]', 2)
79
+ assert_equal example_hash, @request.send(:build_request_data_structure)
80
+ end
81
+
74
82
  def test_build_request_data_structure_when_component_has_no_metrics
75
83
  metric_setup
76
- ::NewRelic::Logger.expects(:warn).with("Component with name \"name\" and guid \"com.test\" had no metrics")
84
+ ::NewRelic::PlatformLogger.expects(:debug).with("Component with name \"name\" and guid \"com.test\" had no metrics")
77
85
  @request.send(:build_request_data_structure)
78
86
  end
79
87
 
@@ -8,18 +8,18 @@ class RunTest < Minitest::Test
8
8
  end
9
9
 
10
10
  def test_log_level_set_verbose
11
- NewRelic::Logger.expects(:log_level=).with(::Logger::DEBUG)
11
+ NewRelic::PlatformLogger.expects(:log_level=).with(::Logger::DEBUG)
12
12
  @newrelic['verbose'] = 1
13
13
  initialize_run
14
14
  end
15
15
 
16
16
  def test_log_level_not_set
17
- NewRelic::Logger.expects(:log_level=).never
17
+ NewRelic::PlatformLogger.expects(:log_level=).never
18
18
  initialize_run
19
19
  end
20
20
 
21
21
  def test_log_level_set_to_not_verbose
22
- NewRelic::Logger.expects(:log_level=).never
22
+ NewRelic::PlatformLogger.expects(:log_level=).never
23
23
  @newrelic['verbose'] = 0
24
24
  initialize_run
25
25
  end
@@ -10,7 +10,7 @@ require 'timecop'
10
10
 
11
11
 
12
12
  module TestingAgent
13
- NewRelic::Logger.log_level = ::Logger::FATAL
13
+ NewRelic::PlatformLogger.log_level = ::Logger::FATAL
14
14
  class Agent < NewRelic::Plugin::Agent::Base
15
15
  agent_guid 'com.newrelic.test'
16
16
  agent_version '0.0.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-10 00:00:00.000000000 Z
12
+ date: 2013-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -128,8 +128,8 @@ files:
128
128
  - lib/newrelic_platform_binding/config.rb
129
129
  - lib/newrelic_platform_binding/connection.rb
130
130
  - lib/newrelic_platform_binding/context.rb
131
- - lib/newrelic_platform_binding/logger.rb
132
131
  - lib/newrelic_platform_binding/metric.rb
132
+ - lib/newrelic_platform_binding/platform_logger.rb
133
133
  - lib/newrelic_platform_binding/request.rb
134
134
  - lib/newrelic_plugin.rb
135
135
  - lib/newrelic_plugin/agent.rb
@@ -148,8 +148,8 @@ files:
148
148
  - test/newrelic_platform_binding/config_test.rb
149
149
  - test/newrelic_platform_binding/connection_test.rb
150
150
  - test/newrelic_platform_binding/context_test.rb
151
- - test/newrelic_platform_binding/logger_test.rb
152
151
  - test/newrelic_platform_binding/metric_test.rb
152
+ - test/newrelic_platform_binding/platform_logger_test.rb
153
153
  - test/newrelic_platform_binding/request_test.rb
154
154
  - test/newrelic_plugin/agent_test.rb
155
155
  - test/newrelic_plugin/run_test.rb