scout_apm 1.2.4.1 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddf754c3343fd74b1e1eee46583ad1f57d10dae5
4
- data.tar.gz: dd9bac67d7a2477c6eae14c3729ffb695ea3ee1c
3
+ metadata.gz: 103d9ad8a0cf748a92bf2283463ced16af225ec6
4
+ data.tar.gz: d941ca86450397e2499805ae3e7d6a717aa26bbb
5
5
  SHA512:
6
- metadata.gz: dbdcc7b57c0aa7dc0b32106f1de6f6b25a25f4cd3592dbe383d5e2a71acd6d6cd1e955c2f7b68027e271ff130a313134d2bc045a0a5d402a446ec4195d028971
7
- data.tar.gz: 2eef5342e7704fcd060991353a3b8753906650fed1b6bbefa0e56a440039e4ca8b46beb6a2339be22b442d40512272a0c39d08ca3e105455dde5c3da2b68dc3a
6
+ metadata.gz: 8402634e74e3153e3031bcb1ccd3854b32f496761b1634e5434afcf5444e7155d1f44e52f549c208ceb32b88aad601bced8b27b9e80d386a424f0397567411bf
7
+ data.tar.gz: dcee383d2769bbb15d0be63a8c7de47f8f025553fd10ee48375a2e4ef52f4f843bd7107e168cf40b4fedcaece40aed3b0915c7646091b900e0067c0a8592168e
@@ -1,3 +1,10 @@
1
+ # 1.2.5
2
+
3
+ * Instrument ActionController::Base instead of ::Metal. This allows us to
4
+ track time spent in before and after filters, and requests that return early
5
+ from before filters.
6
+ * Avoid parsing backtraces for requests that don't end up as Slow Transactions
7
+
1
8
  # 1.2.4.1
2
9
 
3
10
  * Reverting backtrace parser threshold back to 0.5 (same as < v1.2 agents)
@@ -15,11 +15,13 @@ module ScoutApm
15
15
  def install
16
16
  @installed = true
17
17
 
18
- # ActionController::Base is a subclass of ActionController::Metal, so this instruments both
19
- # standard Rails requests + Metal.
20
- if defined?(::ActionController) && defined?(::ActionController::Metal)
21
- ScoutApm::Agent.instance.logger.info "Instrumenting ActionController::Metal"
22
- ::ActionController::Metal.class_eval do
18
+ # We previously instrumented ActionController::Metal, which missed
19
+ # before and after filter timing. Instrumenting Base includes those
20
+ # filters, at the expense of missing out on controllers that don't use
21
+ # the full Rails stack.
22
+ if defined?(::ActionController) && defined?(::ActionController::Base)
23
+ ScoutApm::Agent.instance.logger.info "Instrumenting ActionController::Base"
24
+ ::ActionController::Base.class_eval do
23
25
  # include ScoutApm::Tracer
24
26
  include ScoutApm::Instruments::ActionControllerRails3Instruments
25
27
  end
@@ -58,7 +58,6 @@ module ScoutApm
58
58
  meta_options.merge!(:desc => layer.desc) if layer.desc
59
59
 
60
60
  meta = MetricMeta.new(layer.legacy_metric_name, meta_options)
61
- meta.extra.merge!(:backtrace => layer.backtrace) if layer.backtrace
62
61
  metric_hash[meta] ||= MetricStats.new( meta_options.has_key?(:scope) )
63
62
 
64
63
  stat = metric_hash[meta]
@@ -163,7 +162,7 @@ module ScoutApm
163
162
  if record_specific_metric?(layer.type)
164
163
  meta_options.merge!(:desc => layer.desc) if layer.desc
165
164
  meta = MetricMeta.new(layer.legacy_metric_name, meta_options)
166
- meta.extra.merge!(:backtrace => layer.backtrace) if layer.backtrace
165
+ meta.extra.merge!(:backtrace => ScoutApm::SlowTransaction.backtrace_parser(layer.backtrace)) if layer.backtrace
167
166
  metric_hash[meta] ||= MetricStats.new( meta_options.has_key?(:scope) )
168
167
  stat = metric_hash[meta]
169
168
  stat.update!(layer.total_call_time, layer.total_exclusive_time)
@@ -2,7 +2,7 @@ module ScoutApm
2
2
  class SlowTransaction
3
3
  include ScoutApm::BucketNameSplitter
4
4
 
5
- BACKTRACE_THRESHOLD = 0.5 # the minimum threshold in seconds to record the backtrace for a metric. decreasing this can have a large impact on overhead/
5
+ BACKTRACE_THRESHOLD = 0.5 # the minimum threshold in seconds to record the backtrace for a metric.
6
6
  BACKTRACE_LIMIT = 5 # Max length of callers to display
7
7
  MAX_SIZE = 100 # Limits the size of the metric hash to prevent a metric explosion.
8
8
 
@@ -53,7 +53,7 @@ module ScoutApm
53
53
 
54
54
  # Do this here, rather than in the layer because we need this caller. Maybe able to move it?
55
55
  if layer.total_exclusive_time > ScoutApm::SlowTransaction::BACKTRACE_THRESHOLD
56
- layer.store_backtrace(ScoutApm::SlowTransaction.backtrace_parser(caller))
56
+ layer.store_backtrace(caller)
57
57
  end
58
58
 
59
59
  if finalized?
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.2.4.1"
2
+ VERSION = "1.2.5"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4.1
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-12 00:00:00.000000000 Z
12
+ date: 2016-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project: scout_apm
176
- rubygems_version: 2.4.8
176
+ rubygems_version: 2.2.2
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Ruby application performance monitoring