oneapm_rpm 1.2.7 → 1.2.8.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/one_apm/collector/containers/transaction_sampler.rb +3 -1
- data/lib/one_apm/configuration/default_source.rb +7 -0
- data/lib/one_apm/inst/background_job/rabbitmq.rb +55 -0
- data/lib/one_apm/transaction/sample_buffer/developer_mode_sample_buffer.rb +1 -1
- data/lib/one_apm/version.rb +3 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWYxMWE0NzBlZGRjYTFjZjBmYmU0ODRmZDA4YWQ1M2M2ZjFhN2IxOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjdmODc5NzYwMGQxNjg5NDY5Mjc1OWJkNzlmMGNiYmZiZTAwY2MxYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2ViN2E1ZDBhMTM1MWFiZTU3ZWYwOWE5NzI2MTA5NDY2MTdiYzNkZWEyMGZl
|
10
|
+
Y2JlMjk2NGY2YjUyYzlkYzNkMTNjMDUwZjk0NjQwMmRhOWVjOWZhM2VmYjM4
|
11
|
+
OTJhNTc5MzI0MjNmNzE3YzJjODViMTY5ZTlkYmU5YzNjMTY4YjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODZjMjQ1ZTgzNDViOTRjMTA2YWYyOWZhZDgxNGVmZWM5YTM2ODRjYzEwZjkz
|
14
|
+
ODM0M2JkZmViMWJjNTk0MmQ5YzA0ODhmZTJjYjU3MjEyYjY5YzhiZWI0YTlm
|
15
|
+
ZmE5NDk1OGFiNWRkNThiOTc3ZGQ0YzVjNTI4MDAwNjdkYjNkYmI=
|
@@ -205,7 +205,9 @@ module OneApm
|
|
205
205
|
# than the specified duration
|
206
206
|
def append_backtrace(segment, duration)
|
207
207
|
if duration >= OneApm::Manager.config[:'transaction_tracer.stack_trace_threshold']
|
208
|
-
|
208
|
+
backtrace = caller
|
209
|
+
backtrace.reject! { |t| t.include?('one_apm') }
|
210
|
+
segment[:backtrace] = backtrace.join("\n")
|
209
211
|
end
|
210
212
|
end
|
211
213
|
|
@@ -1201,6 +1201,13 @@ module OneApm
|
|
1201
1201
|
:notified => true,
|
1202
1202
|
:description => 'Defines a path to the agent restart file, excluding the filename.'
|
1203
1203
|
},
|
1204
|
+
:disable_rabbitmq => {
|
1205
|
+
:default => false,
|
1206
|
+
:public => true,
|
1207
|
+
:type => Boolean,
|
1208
|
+
:notified => false,
|
1209
|
+
:description => 'Enable or disable rabbitmq instrumentation.'
|
1210
|
+
},
|
1204
1211
|
:'notified.enable' => {
|
1205
1212
|
:default => true,
|
1206
1213
|
:public => true,
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
LibraryDetection.defer do
|
4
|
+
@name = :rabbitmq
|
5
|
+
|
6
|
+
depends_on do
|
7
|
+
defined?(::Bunny::VERSION) && !OneApm::Manager.config[:disable_rabbitmq]
|
8
|
+
end
|
9
|
+
|
10
|
+
executes do
|
11
|
+
OneApm::Manager.logger.info 'Installing RabbitMQ instrumentation'
|
12
|
+
end
|
13
|
+
|
14
|
+
executes do
|
15
|
+
::Bunny::Session.class_eval do
|
16
|
+
|
17
|
+
include OneApm::Agent::Instrumentation::TransactionBase
|
18
|
+
|
19
|
+
def trace_args(frame)
|
20
|
+
class_name = frame.respond_to?(:method_class) ? frame.method_class.name : frame.class.name.downcase
|
21
|
+
{
|
22
|
+
:name => 'perform',
|
23
|
+
:class_name => class_name,
|
24
|
+
:category => 'OtherTransaction/RabbitMQ'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def send_frame_with_oneapm(frame, signal_activity = true)
|
29
|
+
perform_action_with_oneapm_trace(trace_args(frame)) do
|
30
|
+
send_frame_without_oneapm(frame, signal_activity)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
alias :send_frame_without_oneapm :send_frame
|
34
|
+
alias :send_frame :send_frame_with_oneapm
|
35
|
+
|
36
|
+
def send_frameset_with_oneapm(frames, channel)
|
37
|
+
perform_action_with_oneapm_trace(trace_args(frames[0])) do
|
38
|
+
send_frameset_without_oneapm(frames, channel)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
alias :send_frameset_without_oneapm :send_frameset
|
42
|
+
alias :send_frameset :send_frameset_with_oneapm
|
43
|
+
|
44
|
+
def send_frame_without_timeout_with_oneapm(frame, signal_activity = true)
|
45
|
+
perform_action_with_oneapm_trace(trace_args(frame)) do
|
46
|
+
send_frame_without_timeout_wihout_oneapm(frame, signal_activity)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
alias :send_frame_without_timeout_wihout_oneapm :send_frame_without_timeout
|
50
|
+
alias :send_frame_without_timeout :send_frame_without_timeout_with_oneapm
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
data/lib/one_apm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oneapm_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.8.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oneapm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- lib/one_apm/inst/background_job/delayed_job.rb
|
320
320
|
- lib/one_apm/inst/background_job/delayed_job_injection.rb
|
321
321
|
- lib/one_apm/inst/background_job/event_machine_standalone.rb
|
322
|
+
- lib/one_apm/inst/background_job/rabbitmq.rb
|
322
323
|
- lib/one_apm/inst/background_job/resque.rb
|
323
324
|
- lib/one_apm/inst/background_job/sidekiq.rb
|
324
325
|
- lib/one_apm/inst/dispatcher/passenger.rb
|