scout_apm 1.2.2 → 1.2.3.pre
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 +4 -4
- data/CHANGELOG.markdown +4 -0
- data/lib/scout_apm/slow_transaction.rb +4 -0
- data/lib/scout_apm/store.rb +16 -0
- data/lib/scout_apm/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3a03b4be29a88aee577ac82dc4f7eba338ff3f70
|
|
4
|
+
data.tar.gz: bffbbb70f8a8a027d01ce37e2782dedd1c16e194
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ef56e96fb084291c28381997cab3c43abf92b25353c7a13a02dcaa331ed24cdd5a08f864b1ad8dbcbdffbeb4ed5ecb72cda27eb11bceefce4624d848697d2b4
|
|
7
|
+
data.tar.gz: baa32e0a5e06615c0bbbbcc6558bd9ad82127dc17c8edaa194529925faf60db0c469159219d695f15607134e3011e51eef08932ff7f37ce77a6c95860c5e6d4b
|
data/CHANGELOG.markdown
CHANGED
|
@@ -51,6 +51,10 @@ module ScoutApm
|
|
|
51
51
|
self
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
def has_metrics?
|
|
55
|
+
metrics and metrics.any?
|
|
56
|
+
end
|
|
57
|
+
|
|
54
58
|
def as_json
|
|
55
59
|
json_attributes = [:key, :time, :total_call_time, :uri, [:context, :context_hash], :prof]
|
|
56
60
|
ScoutApm::AttributeArranger.call(self, json_attributes)
|
data/lib/scout_apm/store.rb
CHANGED
|
@@ -101,6 +101,7 @@ module ScoutApm
|
|
|
101
101
|
|
|
102
102
|
def merge_slow_transactions!(slow_transactions)
|
|
103
103
|
@slow_transactions += Array(slow_transactions)
|
|
104
|
+
trim_slow_transaction_metrics
|
|
104
105
|
self
|
|
105
106
|
end
|
|
106
107
|
|
|
@@ -117,6 +118,21 @@ module ScoutApm
|
|
|
117
118
|
|
|
118
119
|
private
|
|
119
120
|
|
|
121
|
+
# Removes payloads from slow transactions that exceed +SlowRequestPolicy::MAX_DETAIL_PER_MINUTE+ to avoid
|
|
122
|
+
# bloating the layaway file.
|
|
123
|
+
def trim_slow_transaction_metrics
|
|
124
|
+
count_with_metrics = 0
|
|
125
|
+
@slow_transactions.each do |s|
|
|
126
|
+
|
|
127
|
+
if s.has_metrics?
|
|
128
|
+
count_with_metrics += 1
|
|
129
|
+
if count_with_metrics > SlowRequestPolicy::MAX_DETAIL_PER_MINUTE
|
|
130
|
+
s.clear_metrics!
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
120
136
|
# We can't aggregate CPU, Memory, Capacity, or Controller, so pass through these metrics directly
|
|
121
137
|
# TODO: Figure out a way to not have this duplicate what's in Samplers, and also on server's ingest
|
|
122
138
|
PASSTHROUGH_METRICS = ["CPU", "Memory", "Instance", "Controller"]
|
data/lib/scout_apm/version.rb
CHANGED
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
|
+
version: 1.2.3.pre
|
|
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
|
+
date: 2016-01-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: minitest
|
|
@@ -164,12 +164,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
164
164
|
version: '0'
|
|
165
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
requirements:
|
|
167
|
-
- - "
|
|
167
|
+
- - ">"
|
|
168
168
|
- !ruby/object:Gem::Version
|
|
169
|
-
version:
|
|
169
|
+
version: 1.3.1
|
|
170
170
|
requirements: []
|
|
171
171
|
rubyforge_project: scout_apm
|
|
172
|
-
rubygems_version: 2.
|
|
172
|
+
rubygems_version: 2.4.8
|
|
173
173
|
signing_key:
|
|
174
174
|
specification_version: 4
|
|
175
175
|
summary: Ruby application performance monitoring
|