yeller_ruby 0.3.3 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yeller/backtrace_filter.rb +17 -3
- data/lib/yeller/version.rb +1 -1
- data/lib/yeller.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75ca2ec992c7f228b51a61baf5b0b83bab8fa2af
|
4
|
+
data.tar.gz: 2d2a0c86c4b612992637d03c2e12b6183d54d6f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f51227e916ca49971edba31f466d90ae229bcafff389306672665567ee573ca3d89d4716a14403bde1e3599fabaabc0dc5aabc549279442226a2e78c9b5fd1
|
7
|
+
data.tar.gz: 230533d1187072dba5d59d05c8dbfcf0bd7c1d6aff6b57ba4b5bbf6f31ffba2cb992e8276b8257395253a8452d431f077b1f09b6e3716e5e6a94d3c43364e7af
|
@@ -1,14 +1,20 @@
|
|
1
1
|
module Yeller
|
2
2
|
class BacktraceFilter
|
3
|
-
attr_reader :filename_filters, :method_filters
|
4
|
-
def initialize(filename_filters, method_filters)
|
3
|
+
attr_reader :filename_filters, :method_filters, :project_root
|
4
|
+
def initialize(filename_filters, method_filters, project_root)
|
5
5
|
@filename_filters = filename_filters
|
6
6
|
@method_filters = method_filters
|
7
|
+
@project_root = project_root
|
7
8
|
end
|
8
9
|
|
9
10
|
def filter(trace)
|
10
11
|
trace.map do |frame|
|
11
|
-
|
12
|
+
in_app = filter_in_app(frame)
|
13
|
+
res = [filter_filename(in_app[0]), in_app[1], filter_method(in_app[2])]
|
14
|
+
if in_app[3]
|
15
|
+
res << in_app[3]
|
16
|
+
end
|
17
|
+
res
|
12
18
|
end
|
13
19
|
end
|
14
20
|
|
@@ -26,5 +32,13 @@ module Yeller
|
|
26
32
|
end
|
27
33
|
method
|
28
34
|
end
|
35
|
+
|
36
|
+
def filter_in_app(frame)
|
37
|
+
filename = frame[0]
|
38
|
+
if filename.start_with?(project_root)
|
39
|
+
frame << {"in-app" => true}
|
40
|
+
end
|
41
|
+
frame
|
42
|
+
end
|
29
43
|
end
|
30
44
|
end
|
data/lib/yeller/version.rb
CHANGED
data/lib/yeller.rb
CHANGED
@@ -34,7 +34,7 @@ module Yeller
|
|
34
34
|
config.servers,
|
35
35
|
config.token,
|
36
36
|
Yeller::StartupParams.defaults(config.startup_params),
|
37
|
-
Yeller::BacktraceFilter.new(config.backtrace_filename_filters, config.backtrace_method_filters),
|
37
|
+
Yeller::BacktraceFilter.new(config.backtrace_filename_filters, config.backtrace_method_filters, config.project_root),
|
38
38
|
config.error_handler,
|
39
39
|
config.skip_exceptions
|
40
40
|
)
|