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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODM4ODhjN2Q1ODM2MjQ5ZWE1MDMyZDFmOTYwN2Q2ZTMzMTNjZDU5MQ==
4
+ YWIwMWVlY2Q3YmQ5M2JlOWJkOWUxMzNhMDYyNTVlNmI2MDJjZDNkOA==
5
5
  data.tar.gz: !binary |-
6
- ZDc4OWNmMDdhMWM0MTI2Y2MzMTZjOTY2ODFhZDI4OWE2NGZhYmUzZA==
6
+ YzgyMWZmMDAzYzU2Y2RiZmFlMTk1MmY5ZjgyZGUzZjRmYzNmOGE1Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDY0YTYyNDMzMGVkMTJhMDc3NDI5ODgyZWZlM2M4ZjE1ZTc3OTdjMWE4OTc3
10
- MWI5OGViZmRiYzdmNzZmNWY1YmY4NDYwZTg5MDM2MTE1ZTljNmQzMGZmOTJi
11
- NzcwZmVmNzNlMDkzMWIwYzc0MzA1Mzk5Y2U1MDhlOWIwZDI4MTc=
9
+ YzUzODczNzQ2ZWZkZTUzNWMwNjVhMmJlNGRjYWY0YzAwZTU1N2E5ZWUyMzE2
10
+ MWUxNTgzYjc0MmVjZjA3YjRlMjAwMmE1M2YwNjcxOTFkMWNjYzQyMGZjNTMy
11
+ ZWI4M2FhNWRlOTQzYTRmNTMyNjM1NzQwNGZkOTUzYzk4ZmE3MjA=
12
12
  data.tar.gz: !binary |-
13
- NzYyOTZhNmNhZjU2YWU1MDZjYmIyNGJkZmVjZGQ2MmVhMmQ3MTI1NGQ0MDAx
14
- MDYzMWMzNjNjMmY2YWY3MTY5OGU4OGFjMzQ2MTlkZjEwMDE5MjYwNjA5OTRj
15
- ZjQ3NGJmMWVjYzMwNTU0OWIzMGNiODM0Njk0MjhmYzhkODUwNzA=
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
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+
3
+ require 'one_apm/frameworks/rails4'
4
+
5
+ module OneApm
6
+ class Probe
7
+ module Frameworks
8
+ class Rails5 < OneApm::Probe::Frameworks::Rails4; end
9
+ end
10
+ end
11
+ end
@@ -73,7 +73,12 @@ module OneApm
73
73
  end
74
74
 
75
75
  def self.adapter
76
- clean_adapter_name(::ActiveJob::Base.queue_adapter.name)
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/
@@ -18,7 +18,7 @@ LibraryDetection.defer do
18
18
  end
19
19
 
20
20
  executes do
21
- OneApm::Manager.logger.info 'Installing ActiveRecord 4 instrumentation'
21
+ OneApm::Manager.logger.info "Installing ActiveRecord #{::ActiveRecord::VERSION::MAJOR} instrumentation"
22
22
  end
23
23
 
24
24
  executes do
@@ -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 == 4
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 'Installing Rails 4 Controller instrumentation'
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 == 4
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 'Installing Rails 4 view instrumentation'
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 == 4
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 'Installing Rails 4 Error instrumentation'
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
 
@@ -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 !ignore_frames.empty? && ignore_frames.include?(outermost_frame.name)
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,
@@ -5,10 +5,11 @@ module OneApm
5
5
 
6
6
  MAJOR = 1
7
7
  MINOR = 3
8
- TINY = 2
8
+ TINY = 3
9
+ TAG = 'rc1'
9
10
 
10
11
 
11
- STRING = [MAJOR, MINOR, TINY].compact.join('.')
12
+ STRING = [MAJOR, MINOR, TINY, TAG].compact.join('.')
12
13
 
13
14
  end
14
15
  end
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.2
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-18 00:00:00.000000000 Z
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