scout_apm 2.1.3 → 2.1.4

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: ee80eaab8042686350c223a715ff7a12ff7b5eee
4
- data.tar.gz: 13d93be3815d1b014716081d130466764a79aeed
3
+ metadata.gz: 5e7455372ff88117a2caf4ecac5634b833131c30
4
+ data.tar.gz: c726bd01b48f93f6bd55f5b06dd36f86ecabfa4b
5
5
  SHA512:
6
- metadata.gz: bba413fa76099cdede351d9fa6263ea53e93448a8235918ddac4a9c1072174aff0fb084a5e3cd591079e656d779c369838bc6866b2644c75772e4ab0dc85442c
7
- data.tar.gz: ccbc7c25bc0aae891b79563b14c4bc4d72ca8f1ebe92b1a32c19e7e74861e61a3003208117a5d9a26dba3c2d83f7b49b7fc351d5df3670ff189c59cacd865869
6
+ metadata.gz: 8d996da034590250b3fcc9b87a412de39ddb01956ee144c4bd4917f4f7b18f6a23650fcbd9b9e2f6f48c2ac8952cc972bd65415b5e5cbbcc733fa26981111796
7
+ data.tar.gz: ea8f5cfe8e3e9222d138a7c09f40d57b32d19a756f8472b6d764b125f57a34cf54bf3f884668147a661cf1af1d3afd10e18dca9a9d4b110fb9d372c37fbea82a
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ # 80 is stifling, especially with a few levels of nesting before we even start.
2
+ # So bump it to 100 to keep really long lines from creeping in.
3
+ Metrics/LineLength:
4
+ Max: 100
5
+
6
+ Style/UseHashRocketsWithSymbolValues: false
7
+
8
+
data/CHANGELOG.markdown CHANGED
@@ -1,5 +1,11 @@
1
1
  # master
2
2
 
3
+ # 2.1.4
4
+
5
+ * Enhance regular expression that determines if a backtrace line is "inside"
6
+ the application
7
+ * Avoids labeling vendor/ as part of the monitored app
8
+
3
9
  # 2.1.3
4
10
 
5
11
  * Less noisy output on errors with Context
@@ -14,7 +14,10 @@ module ScoutApm
14
14
  def initialize(call_stack, root=ScoutApm::Environment.instance.root)
15
15
  @call_stack = call_stack
16
16
  # We can't use a constant as it'd be too early to fetch environment info
17
- @@app_dir_regex = %r|#{root}/(.*)|
17
+ #
18
+ # This regex looks for files under the app root, inside lib/, app/, and
19
+ # config/ dirs, and captures the path under root.
20
+ @@app_dir_regex = %r[#{root}/((?:lib/|app/|config/).*)]
18
21
  end
19
22
 
20
23
  def call
@@ -27,7 +30,6 @@ module ScoutApm
27
30
  end
28
31
  stack
29
32
  end
30
-
31
33
  end
32
34
  end
33
35
  end
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.1.3"
2
+ VERSION = "2.1.4"
3
3
  end
4
4
 
@@ -49,4 +49,18 @@ class BacktraceParserTest < Minitest::Test
49
49
  result = ScoutApm::Utils::BacktraceParser.new(raw_backtrace, "/Users/scout/different-secrets").call
50
50
  assert_equal 0, result.length
51
51
  end
52
+
53
+ def test_excludes_vendor_paths
54
+ raw_backtrace = [
55
+ "#{root}/vendor/ruby/thing.rb",
56
+ "#{root}/app/controllers/users_controller.rb",
57
+ "#{root}/vendor/ruby/thing.rb",
58
+ "#{root}/config/initializers/inject_something.rb",
59
+ ]
60
+ result = ScoutApm::Utils::BacktraceParser.new(raw_backtrace, root).call
61
+
62
+ assert_equal 2, result.length
63
+ assert_equal false, (result[0] =~ %r|app/controllers/users_controller.rb|).nil?
64
+ assert_equal false, (result[1] =~ %r|config/initializers/inject_something.rb|).nil?
65
+ end
52
66
  end
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: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -118,6 +118,7 @@ extensions:
118
118
  extra_rdoc_files: []
119
119
  files:
120
120
  - ".gitignore"
121
+ - ".rubocop.yml"
121
122
  - CHANGELOG.markdown
122
123
  - Gemfile
123
124
  - LICENSE.md