newrelic_rpm 6.3.0.355 → 6.4.0.356
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -5
- data/CHANGELOG.md +44 -0
- data/lib/new_relic/agent/commands/agent_command_router.rb +2 -21
- data/lib/new_relic/agent/configuration/default_source.rb +1 -29
- data/lib/new_relic/agent/configuration/environment_source.rb +4 -2
- data/lib/new_relic/agent/configuration/high_security_source.rb +1 -0
- data/lib/new_relic/agent/connect/request_builder.rb +5 -0
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +24 -42
- data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +45 -69
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +70 -53
- data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +29 -8
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +33 -47
- data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +2 -2
- data/lib/new_relic/agent/instrumentation/grape.rb +2 -3
- data/lib/new_relic/agent/instrumentation/{evented_subscriber.rb → notifications_subscriber.rb} +7 -66
- data/lib/new_relic/agent/new_relic_service.rb +0 -4
- data/lib/new_relic/agent/threading/backtrace_service.rb +3 -3
- data/lib/new_relic/agent/threading/thread_profile.rb +9 -23
- data/lib/new_relic/agent/transaction.rb +0 -2
- data/lib/new_relic/agent/transaction/trace.rb +3 -8
- data/lib/new_relic/agent/transaction/trace_builder.rb +0 -1
- data/lib/new_relic/agent/transaction_sampler.rb +1 -5
- data/lib/new_relic/rack/browser_monitoring.rb +10 -8
- data/lib/new_relic/version.rb +1 -1
- data/lib/tasks/config.rake +1 -2
- metadata +3 -6
- data/lib/new_relic/agent/commands/xray_session.rb +0 -55
- data/lib/new_relic/agent/commands/xray_session_collection.rb +0 -161
- data/lib/new_relic/agent/transaction/xray_sample_buffer.rb +0 -64
@@ -1,64 +0,0 @@
|
|
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
|
-
require 'new_relic/agent/transaction/transaction_sample_buffer'
|
6
|
-
|
7
|
-
module NewRelic
|
8
|
-
module Agent
|
9
|
-
class Transaction
|
10
|
-
class XraySampleBuffer < TransactionSampleBuffer
|
11
|
-
|
12
|
-
attr_writer :xray_session_collection
|
13
|
-
|
14
|
-
def initialize
|
15
|
-
super
|
16
|
-
|
17
|
-
# Memoize the config setting since this happens per request
|
18
|
-
@enabled = NewRelic::Agent.config[:'xray_session.allow_traces']
|
19
|
-
NewRelic::Agent.config.register_callback(:'xray_session.allow_traces') do |new_value|
|
20
|
-
@enabled = new_value
|
21
|
-
end
|
22
|
-
|
23
|
-
@capacity = NewRelic::Agent.config[:'xray_session.max_samples']
|
24
|
-
NewRelic::Agent.config.register_callback(:'xray_session.max_samples') do |new_value|
|
25
|
-
@capacity = new_value
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def xray_session_collection
|
30
|
-
@xray_session_collection ||= NewRelic::Agent.instance.agent_command_router.xray_session_collection
|
31
|
-
end
|
32
|
-
|
33
|
-
def capacity
|
34
|
-
@capacity
|
35
|
-
end
|
36
|
-
|
37
|
-
def truncate_samples
|
38
|
-
# First in wins, so stop on allow_sample? instead of truncating
|
39
|
-
end
|
40
|
-
|
41
|
-
def allow_sample?(sample)
|
42
|
-
!full? && !lookup_session_id(sample).nil?
|
43
|
-
end
|
44
|
-
|
45
|
-
def enabled?
|
46
|
-
@enabled
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
|
-
private
|
51
|
-
|
52
|
-
def add_sample(sample)
|
53
|
-
super(sample)
|
54
|
-
sample.xray_session_id = lookup_session_id(sample)
|
55
|
-
end
|
56
|
-
|
57
|
-
def lookup_session_id(sample)
|
58
|
-
xray_session_collection.session_id_for_transaction_name(sample.transaction_name)
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|