scout_apm 1.5.1 → 1.5.2

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: 821081b647db6830249362c9ccd52dbbf81ad8e9
4
- data.tar.gz: e411860c26b51a5f57d7173a66ad0b6b113f8ae8
3
+ metadata.gz: 63d6bfdf9e557d66a065ff10e5572f7216fa5313
4
+ data.tar.gz: 8985462f9fe11d8f0c9b1a7e754754b404e1ac72
5
5
  SHA512:
6
- metadata.gz: 96213c4483fd035362120320e6e590ef8003b6ca329103fb94c568f6ec6bc63a776a6ef78fc46364b67ed1cbff821c67c58a86496305b39cb2651ec4984d5e89
7
- data.tar.gz: 5c9b8e1019592a6612a6c15d0253e2a33e91481a4a994c066a6ffdf4c461c4a51238addae0b6322c7f927e123486338af18a75879452d69a407c7d30f22247c1
6
+ metadata.gz: 5096255086114087eb5ebe349ca32de5fee8ab1c17348bb2cdaa79a6e1307cc7f87cd48e0c1dd136c9b5cbe6943d37c8b7afc0231ecf0b73c4f4d38c3211c72e
7
+ data.tar.gz: 830663da6a9c1e1a549ae91c89bcb5d78badb9e44b341c30ec9849fc1d94b40ae32003e1b25095974a9128c08cd90b880f10ce74936be1367ba980d089ee20ca
@@ -1,3 +1,7 @@
1
+ # 1.5.2
2
+
3
+ * Force timestamps to be iso8601 format
4
+
1
5
  # 1.5.1
2
6
 
3
7
  * Add `ignore_traces` config option to ignore SlowTransactions from certain URIs.
@@ -2,8 +2,32 @@
2
2
  module ScoutApm
3
3
  class LayawayFile
4
4
  def path
5
- ScoutApm::Agent.instance.config.value("data_file") ||
6
- "#{ScoutApm::Agent.instance.default_log_path}/scout_apm.db"
5
+ return @path if @path
6
+
7
+ candidates = [
8
+ ScoutApm::Agent.instance.config.value("data_file"),
9
+ "#{ScoutApm::Agent.instance.default_log_path}/scout_apm.db",
10
+ "#{ScoutApm::Agent.instance.environment.root}/tmp/scout_apm.db"
11
+ ]
12
+
13
+ candidates.each do |candidate|
14
+ next if candidate.nil?
15
+
16
+ begin
17
+ ScoutApm::Agent.instance.logger.debug("Checking Layaway File Location: #{candidate}")
18
+ File.open(candidate, "w") { |f| } # Open & Close to check that we can
19
+
20
+ # No exception, it is valid
21
+ ScoutApm::Agent.instance.logger.info("Layaway File location found: #{candidate}")
22
+ @path = candidate
23
+ return @path
24
+ rescue Exception
25
+ ScoutApm::Agent.instance.logger.debug("Couldn't open layaway file for test write at #{candidate}")
26
+ end
27
+ end
28
+
29
+ ScoutApm::Agent.instance.logger.error("No valid layaway file found, please set a location in the configuration key `data_file`")
30
+ nil
7
31
  end
8
32
 
9
33
  def dump(object)
@@ -59,6 +59,8 @@ module ScoutApm
59
59
  "[#{all_the_elements.join(",")}]"
60
60
  when Numeric
61
61
  formatee
62
+ when Time
63
+ formatee.iso8601
62
64
  when nil
63
65
  "null"
64
66
  else # strings and everything
@@ -75,7 +75,7 @@ module ScoutApm
75
75
  end
76
76
 
77
77
  def scrubbed(str)
78
- return '' if !str.is_a?(String) || str.length > 1000 # safeguard - don't sanitize or scrub large SQL statements
78
+ return '' if !str.is_a?(String) || str.length > 4000 # safeguard - don't sanitize or scrub large SQL statements
79
79
  return str if !str.respond_to?(:encode) # Ruby <= 1.8 doesn't have string encoding
80
80
  return str if str.valid_encoding? # Whatever encoding it is, it is valid and we can operate on it
81
81
  ScoutApm::Agent.instance.logger.debug "Scrubbing invalid sql encoding."
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
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.5.1
4
+ version: 1.5.2
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-05-10 00:00:00.000000000 Z
12
+ date: 2016-05-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest