newrelic_rpm 4.6.0.338 → 4.7.0.339
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +61 -0
- data/lib/new_relic/agent/configuration/default_source.rb +7 -0
- data/lib/new_relic/agent/datastores.rb +9 -2
- data/lib/new_relic/agent/error_collector.rb +4 -2
- data/lib/new_relic/agent/external.rb +5 -1
- data/lib/new_relic/agent/http_clients/excon_wrappers.rb +3 -1
- data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +4 -2
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +1 -1
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_record.rb +17 -3
- data/lib/new_relic/agent/instrumentation/active_record_4.rb +9 -1
- data/lib/new_relic/agent/instrumentation/active_record_5.rb +5 -61
- data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +61 -0
- data/lib/new_relic/agent/instrumentation/bunny.rb +3 -1
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -0
- data/lib/new_relic/agent/instrumentation/curb.rb +4 -1
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +5 -1
- data/lib/new_relic/agent/instrumentation/excon/connection.rb +4 -1
- data/lib/new_relic/agent/instrumentation/excon/middleware.rb +4 -1
- data/lib/new_relic/agent/instrumentation/http.rb +4 -1
- data/lib/new_relic/agent/instrumentation/httpclient.rb +4 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +4 -1
- data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +5 -2
- data/lib/new_relic/agent/instrumentation/mongo.rb +6 -1
- data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +6 -1
- data/lib/new_relic/agent/instrumentation/net.rb +4 -1
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +5 -3
- data/lib/new_relic/agent/instrumentation/rails4/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails4/action_view.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails5/action_cable.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails5/action_controller.rb +5 -5
- data/lib/new_relic/agent/instrumentation/rails5/action_view.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_middleware.rb +1 -1
- data/lib/new_relic/agent/instrumentation/redis.rb +21 -6
- data/lib/new_relic/agent/instrumentation/typhoeus.rb +48 -24
- data/lib/new_relic/agent/javascript_instrumentor.rb +2 -2
- data/lib/new_relic/agent/messaging.rb +7 -5
- data/lib/new_relic/agent/method_tracer_helpers.rb +5 -1
- data/lib/new_relic/agent/range_extensions.rb +47 -0
- data/lib/new_relic/agent/transaction.rb +8 -2
- data/lib/new_relic/agent/transaction/abstract_segment.rb +134 -25
- data/lib/new_relic/agent/transaction/datastore_segment.rb +5 -2
- data/lib/new_relic/agent/transaction/external_request_segment.rb +3 -2
- data/lib/new_relic/agent/transaction/segment.rb +0 -3
- data/lib/new_relic/agent/transaction/tracing.rb +77 -20
- data/lib/new_relic/agent/transaction_error_primitive.rb +2 -0
- data/lib/new_relic/noticed_error.rb +9 -6
- data/lib/new_relic/version.rb +1 -1
- data/lib/sequel/extensions/newrelic_instrumentation.rb +4 -1
- data/lib/sequel/plugins/newrelic_instrumentation.rb +5 -1
- metadata +4 -2
@@ -19,6 +19,7 @@ module NewRelic
|
|
19
19
|
TYPE_KEY = 'type'.freeze
|
20
20
|
ERROR_CLASS_KEY = 'error.class'.freeze
|
21
21
|
ERROR_MESSAGE_KEY = 'error.message'.freeze
|
22
|
+
ERROR_EXPECTED_KEY = 'error.expected'.freeze
|
22
23
|
TIMESTAMP_KEY = 'timestamp'.freeze
|
23
24
|
PORT_KEY = 'port'.freeze
|
24
25
|
NAME_KEY = 'transactionName'.freeze
|
@@ -43,6 +44,7 @@ module NewRelic
|
|
43
44
|
TYPE_KEY => SAMPLE_TYPE,
|
44
45
|
ERROR_CLASS_KEY => noticed_error.exception_class_name,
|
45
46
|
ERROR_MESSAGE_KEY => noticed_error.message,
|
47
|
+
ERROR_EXPECTED_KEY => noticed_error.expected,
|
46
48
|
TIMESTAMP_KEY => noticed_error.timestamp.to_f
|
47
49
|
}
|
48
50
|
|
@@ -12,7 +12,8 @@ class NewRelic::NoticedError
|
|
12
12
|
|
13
13
|
attr_accessor :path, :timestamp, :message, :exception_class_name,
|
14
14
|
:request_uri, :request_port, :file_name, :line_number,
|
15
|
-
:stack_trace, :attributes_from_notice_error, :attributes
|
15
|
+
:stack_trace, :attributes_from_notice_error, :attributes,
|
16
|
+
:expected
|
16
17
|
|
17
18
|
attr_reader :exception_id, :is_internal
|
18
19
|
|
@@ -45,6 +46,7 @@ class NewRelic::NoticedError
|
|
45
46
|
@attributes_from_notice_error = nil
|
46
47
|
@attributes = nil
|
47
48
|
@timestamp = timestamp
|
49
|
+
@expected = false
|
48
50
|
end
|
49
51
|
|
50
52
|
def ==(other)
|
@@ -94,10 +96,11 @@ class NewRelic::NoticedError
|
|
94
96
|
|
95
97
|
def base_parameters
|
96
98
|
params = {}
|
97
|
-
params[:request_uri]
|
98
|
-
params[:file_name]
|
99
|
-
params[:line_number]
|
100
|
-
params[:stack_trace]
|
99
|
+
params[:request_uri] = request_uri if request_uri
|
100
|
+
params[:file_name] = file_name if file_name
|
101
|
+
params[:line_number] = line_number if line_number
|
102
|
+
params[:stack_trace] = stack_trace if stack_trace
|
103
|
+
params[:'error.expected'] = expected
|
101
104
|
params
|
102
105
|
end
|
103
106
|
|
@@ -165,7 +168,7 @@ class NewRelic::NoticedError
|
|
165
168
|
@exception_class_name = UNKNOWN_ERROR_CLASS_NAME
|
166
169
|
@message = NIL_ERROR_MESSAGE
|
167
170
|
else
|
168
|
-
if defined?(Rails) && Rails::VERSION::MAJOR < 5 && exception.respond_to?(:original_exception)
|
171
|
+
if defined?(Rails::VERSION::MAJOR) && Rails::VERSION::MAJOR < 5 && exception.respond_to?(:original_exception)
|
169
172
|
exception = exception.original_exception || exception
|
170
173
|
end
|
171
174
|
@exception_class_name = exception.is_a?(Exception) ? exception.class.name : UNKNOWN_ERROR_CLASS_NAME
|
data/lib/new_relic/version.rb
CHANGED
@@ -47,7 +47,10 @@ module Sequel
|
|
47
47
|
|
48
48
|
product = NewRelic::Agent::Instrumentation::SequelHelper.product_name_from_adapter(self.class.adapter_scheme)
|
49
49
|
operation = NewRelic::Agent::Datastores::MetricHelper.operation_from_sql(sql)
|
50
|
-
segment = NewRelic::Agent::Transaction.start_datastore_segment
|
50
|
+
segment = NewRelic::Agent::Transaction.start_datastore_segment(
|
51
|
+
product: product,
|
52
|
+
operation: operation
|
53
|
+
)
|
51
54
|
|
52
55
|
begin
|
53
56
|
super(*args, &blk)
|
@@ -23,7 +23,11 @@ module Sequel
|
|
23
23
|
define_method(method_name) do |*args, &block|
|
24
24
|
klass = self.is_a?(Class) ? self : self.class
|
25
25
|
product = NewRelic::Agent::Instrumentation::SequelHelper.product_name_from_adapter(db.adapter_scheme)
|
26
|
-
segment = NewRelic::Agent::Transaction.start_datastore_segment(
|
26
|
+
segment = NewRelic::Agent::Transaction.start_datastore_segment(
|
27
|
+
product: product,
|
28
|
+
operation: operation_name,
|
29
|
+
collection: klass.name
|
30
|
+
)
|
27
31
|
|
28
32
|
begin
|
29
33
|
NewRelic::Agent.disable_all_tracing { super(*args, &block) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.7.0.339
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Wear
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -239,6 +239,7 @@ files:
|
|
239
239
|
- lib/new_relic/agent/instrumentation/active_record_4.rb
|
240
240
|
- lib/new_relic/agent/instrumentation/active_record_5.rb
|
241
241
|
- lib/new_relic/agent/instrumentation/active_record_helper.rb
|
242
|
+
- lib/new_relic/agent/instrumentation/active_record_prepend.rb
|
242
243
|
- lib/new_relic/agent/instrumentation/active_record_subscriber.rb
|
243
244
|
- lib/new_relic/agent/instrumentation/acts_as_solr.rb
|
244
245
|
- lib/new_relic/agent/instrumentation/authlogic.rb
|
@@ -307,6 +308,7 @@ files:
|
|
307
308
|
- lib/new_relic/agent/pipe_channel_manager.rb
|
308
309
|
- lib/new_relic/agent/pipe_service.rb
|
309
310
|
- lib/new_relic/agent/prepend_supportability.rb
|
311
|
+
- lib/new_relic/agent/range_extensions.rb
|
310
312
|
- lib/new_relic/agent/rules_engine.rb
|
311
313
|
- lib/new_relic/agent/rules_engine/replacement_rule.rb
|
312
314
|
- lib/new_relic/agent/rules_engine/segment_terms_rule.rb
|