oneapm_rpm 1.3.2 → 1.3.3.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/configuration/default_source.rb +3 -0
- data/lib/one_apm/frameworks/rails5.rb +11 -0
- data/lib/one_apm/inst/background_job/active_job.rb +6 -1
- data/lib/one_apm/inst/orm/active_record_4.rb +1 -1
- data/lib/one_apm/inst/rails4/action_controller.rb +2 -2
- data/lib/one_apm/inst/rails4/action_view.rb +2 -2
- data/lib/one_apm/inst/rails4/errors.rb +3 -3
- data/lib/one_apm/rack/middleware_tracing.rb +2 -2
- data/lib/one_apm/transaction.rb +7 -1
- data/lib/one_apm/transaction/class_methods.rb +3 -3
- 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
|
+
YWIwMWVlY2Q3YmQ5M2JlOWJkOWUxMzNhMDYyNTVlNmI2MDJjZDNkOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzgyMWZmMDAzYzU2Y2RiZmFlMTk1MmY5ZjgyZGUzZjRmYzNmOGE1Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzUzODczNzQ2ZWZkZTUzNWMwNjVhMmJlNGRjYWY0YzAwZTU1N2E5ZWUyMzE2
|
10
|
+
MWUxNTgzYjc0MmVjZjA3YjRlMjAwMmE1M2YwNjcxOTFkMWNjYzQyMGZjNTMy
|
11
|
+
ZWI4M2FhNWRlOTQzYTRmNTMyNjM1NzQwNGZkOTUzYzk4ZmE3MjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTFlZTI5YjA3YzUwNDM4NjdmZmZhNDYyYTAzYjhhNjEyYzdjYzY4NGE1YTc3
|
14
|
+
YTIzZjg0YzRiMjU0YzlmN2FlZTdiODUxYjQ4YTY4YWZhOTI3Y2ZkYmVhMDVh
|
15
|
+
YTA0Y2Y3YWZmYzExZGE5NzM1MWRjNWUyZDU0OGYwMzY3N2MzZGE=
|
@@ -69,8 +69,11 @@ module OneApm
|
|
69
69
|
:rails3
|
70
70
|
when 4
|
71
71
|
:rails4
|
72
|
+
when 5
|
73
|
+
:rails5
|
72
74
|
else
|
73
75
|
OneApm::Manager.logger.error "Detected unsupported Rails version #{Rails::VERSION::STRING}"
|
76
|
+
:rails
|
74
77
|
end
|
75
78
|
when defined?(::Sinatra) && defined?(::Sinatra::Base) then :sinatra
|
76
79
|
when defined?(::OneApm::IA) then :external
|
@@ -73,7 +73,12 @@ module OneApm
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def self.adapter
|
76
|
-
|
76
|
+
name = if ::ActiveJob::Base.queue_adapter.respond_to?(:name)
|
77
|
+
::ActiveJob::Base.queue_adapter.name
|
78
|
+
else
|
79
|
+
::ActiveJob::Base.queue_adapter.to_s
|
80
|
+
end
|
81
|
+
clean_adapter_name(name)
|
77
82
|
end
|
78
83
|
|
79
84
|
ADAPTER_REGEX = /ActiveJob::QueueAdapters::(.*)Adapter/
|
@@ -6,7 +6,7 @@ LibraryDetection.defer do
|
|
6
6
|
@name = :rails4_controller
|
7
7
|
|
8
8
|
depends_on do
|
9
|
-
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i
|
9
|
+
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 4
|
10
10
|
end
|
11
11
|
|
12
12
|
depends_on do
|
@@ -14,7 +14,7 @@ LibraryDetection.defer do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
executes do
|
17
|
-
OneApm::Manager.logger.info
|
17
|
+
OneApm::Manager.logger.info "Installing Rails #{::Rails::VERSION::MAJOR} Controller instrumentation"
|
18
18
|
end
|
19
19
|
|
20
20
|
executes do
|
@@ -5,7 +5,7 @@ LibraryDetection.defer do
|
|
5
5
|
@name = :rails4_view
|
6
6
|
|
7
7
|
depends_on do
|
8
|
-
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i
|
8
|
+
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 4
|
9
9
|
end
|
10
10
|
|
11
11
|
depends_on do
|
@@ -14,7 +14,7 @@ LibraryDetection.defer do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
executes do
|
17
|
-
OneApm::Manager.logger.info
|
17
|
+
OneApm::Manager.logger.info "Installing Rails #{::Rails::VERSION::MAJOR} view instrumentation"
|
18
18
|
end
|
19
19
|
|
20
20
|
executes do
|
@@ -23,15 +23,15 @@ LibraryDetection.defer do
|
|
23
23
|
@name = :rails4_error
|
24
24
|
|
25
25
|
depends_on do
|
26
|
-
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i
|
26
|
+
defined?(::Rails) && ::Rails::VERSION::MAJOR.to_i >= 4
|
27
27
|
end
|
28
28
|
|
29
29
|
depends_on do
|
30
|
-
defined?(ActionController) && defined?(ActionController::Base)
|
30
|
+
defined?(::ActionController) && defined?(::ActionController::Base)
|
31
31
|
end
|
32
32
|
|
33
33
|
executes do
|
34
|
-
OneApm::Manager.logger.info
|
34
|
+
OneApm::Manager.logger.info "Installing Rails #{::Rails::VERSION::MAJOR} Error instrumentation"
|
35
35
|
end
|
36
36
|
|
37
37
|
executes do
|
@@ -57,13 +57,13 @@ module OneApm::Rack
|
|
57
57
|
state = OneApm::TransactionState.tl_get
|
58
58
|
begin
|
59
59
|
options = build_transaction_options(env, first_middleware)
|
60
|
+
|
60
61
|
current_transaction = OneApm::Transaction.start(state, category, options)
|
62
|
+
current_transaction.ignore_frames << options[:transaction_name] if respond_to?(:middleware_ignore?) && middleware_ignore?
|
61
63
|
|
62
64
|
events.notify(:before_call, env) if first_middleware
|
63
65
|
result = (target == self) ? traced_call(env) : target.call(env)
|
64
66
|
|
65
|
-
current_transaction.ignore_frames << options[:transaction_name] if respond_to?(:middleware_ignore?) && middleware_ignore?
|
66
|
-
|
67
67
|
capture_http_response_code(state, result)
|
68
68
|
events.notify(:after_call, env, result) if first_middleware
|
69
69
|
|
data/lib/one_apm/transaction.rb
CHANGED
@@ -98,7 +98,7 @@ module OneApm
|
|
98
98
|
trace_options = TRACE_OPTIONS_UNSCOPED
|
99
99
|
end
|
100
100
|
|
101
|
-
trace_options = TRACE_IGNORE_OPTIONS if
|
101
|
+
trace_options = TRACE_IGNORE_OPTIONS if ignore_frame?(outermost_frame.name)
|
102
102
|
|
103
103
|
# These metrics are recorded here instead of in record_summary_metrics
|
104
104
|
# in order to capture the exclusive time associated with the outer-most
|
@@ -219,6 +219,7 @@ module OneApm
|
|
219
219
|
end
|
220
220
|
|
221
221
|
def merge_metrics
|
222
|
+
return if ignore_frame?(best_name)
|
222
223
|
agent.stats_engine.merge_transaction_metrics!(@metrics, best_name)
|
223
224
|
end
|
224
225
|
|
@@ -297,5 +298,10 @@ module OneApm
|
|
297
298
|
end
|
298
299
|
end
|
299
300
|
|
301
|
+
def ignore_frame? tx_name
|
302
|
+
return false if ignore_frames.empty?
|
303
|
+
ignore_frames.any?{|iframe| tx_name.to_s.match(/#{iframe}/)}
|
304
|
+
end
|
305
|
+
|
300
306
|
end
|
301
307
|
end
|
@@ -35,9 +35,6 @@ module OneApm
|
|
35
35
|
end
|
36
36
|
|
37
37
|
nested_frame = txn.frame_stack.pop
|
38
|
-
|
39
|
-
options = Transaction::NESTED_TRACE_STOP_OPTIONS
|
40
|
-
options = Transaction::TRACE_IGNORE_OPTIONS if !txn.ignore_frames.empty? && txn.ignore_frames.include?(nested_frame.name)
|
41
38
|
|
42
39
|
if txn.frame_stack.empty?
|
43
40
|
txn.stop(state, end_time, nested_frame)
|
@@ -51,6 +48,9 @@ module OneApm
|
|
51
48
|
summary_metrics = Transaction::EMPTY_SUMMARY_METRICS
|
52
49
|
end
|
53
50
|
|
51
|
+
options = Transaction::NESTED_TRACE_STOP_OPTIONS
|
52
|
+
options = Transaction::TRACE_IGNORE_OPTIONS if txn.ignore_frame?(nested_name)
|
53
|
+
|
54
54
|
OneApm::Support::MethodTracer::Helpers.trace_execution_scoped_footer(
|
55
55
|
state,
|
56
56
|
nested_frame.start_time.to_f,
|
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.3.
|
4
|
+
version: 1.3.3.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-12-
|
11
|
+
date: 2015-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -310,6 +310,7 @@ files:
|
|
310
310
|
- lib/one_apm/frameworks/rails.rb
|
311
311
|
- lib/one_apm/frameworks/rails3.rb
|
312
312
|
- lib/one_apm/frameworks/rails4.rb
|
313
|
+
- lib/one_apm/frameworks/rails5.rb
|
313
314
|
- lib/one_apm/frameworks/ruby.rb
|
314
315
|
- lib/one_apm/frameworks/sinatra.rb
|
315
316
|
- lib/one_apm/inst/3rd/active_merchant.rb
|