scout_apm 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 775fbb31b292af0249e53823fd743b051f12a612
4
- data.tar.gz: c38270792896a7d986a4ef87171b7d532ca8d39d
3
+ metadata.gz: c3bbbb3dd86b9f1a56e1685ac3ccdc4112c0e7af
4
+ data.tar.gz: 2d51d2c01098a18d18921bface763188a4945718
5
5
  SHA512:
6
- metadata.gz: f86a5da6ce114547d61fedb7b955233e43b65246064edf74ca4630affdf872a709946f8dff9aef5c2cf3e695a91e22c1d118ceb79e718899d0075618a16bcd3c
7
- data.tar.gz: bc6adffb1608d105d4aface08d72a4afb00ae29feed3f07cbd1e0f11cfd8eed0c1197aa2e879848749432f6c2921ef2145df8bc9f2aa9a8fddc53849396db80f
6
+ metadata.gz: 8e47262921e4a05f4b549a73c394594a211a49fb1a00197d22b0c877ed4485713a4046e44ee201d5c47ae0a6318a7880dcadcdbab6d7474bdfcc518450ff09d7
7
+ data.tar.gz: fbbbb2ce2671487f105b6b0a24087e8fcaf20abe30728afa7e7c1214aa827db677c00d5ed4426a32f8cfd30a8761b6454c991844f4b5eec3126297c196eec6d3
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.3.1
2
+
3
+ * Handling nil scope in LayerSlowTransactionConverter
4
+
1
5
  # 1.3.0
2
6
 
3
7
  * Lazy metric naming for ActiveRecord calls
@@ -89,19 +89,19 @@ module ScoutApm
89
89
  # return a 2 element array, [ Slow Transaction or Nil , Hash of metrics to store ]
90
90
  class LayerSlowTransactionConverter < LayerConverterBase
91
91
  def call
92
+ scope = scope_layer
93
+ return [nil, {}] unless scope
94
+
92
95
  policy = ScoutApm::Agent.instance.slow_request_policy.capture_type(root_layer.total_call_time)
93
96
  if policy == ScoutApm::SlowRequestPolicy::CAPTURE_NONE
94
97
  return [nil, {}]
95
98
  end
96
99
 
97
100
  # increment the slow transaction count if this is a slow transaction.
98
- meta = MetricMeta.new("SlowTransaction/#{scope_layer.legacy_metric_name}")
101
+ meta = MetricMeta.new("SlowTransaction/#{scope.legacy_metric_name}")
99
102
  stat = MetricStats.new
100
103
  stat.update!(1)
101
104
 
102
- scope = scope_layer
103
- return [nil, {}] unless scope
104
-
105
105
  uri = request.annotations[:uri] || ""
106
106
 
107
107
  metrics = create_metrics
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
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.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes