builder_apm 0.2.0 → 0.2.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb49aa255e318beaebed1eb541cd8bf1cf01bd8f5afe9b6ece98323f76952f42
|
4
|
+
data.tar.gz: c1f282761fa25d4ab0d9ffcdc0a8f8d29932e0696d20a2cede3342cfb8eee6d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9ed786df7a7531c8b79a314069bfcfde5a773520b1a603b605096feff55696bdde7b4aba8ab710e5ef9f11782a41ee391de62f0b5237b0273582d3b396aa5cd
|
7
|
+
data.tar.gz: 25fbcc9f411b55dd3aecf5b593b64d776df83f90b06208c7045daeaf16be8c63e5fec2b452ec664ee212b2c8e8ab23c065f8a47ff3722467bbac6a3f0194de8c
|
@@ -3,8 +3,8 @@
|
|
3
3
|
|
4
4
|
<script>
|
5
5
|
var allData = null;
|
6
|
-
var isAsc =
|
7
|
-
var current_sort_field = '
|
6
|
+
var isAsc = false;
|
7
|
+
var current_sort_field = 'real_start_time';
|
8
8
|
|
9
9
|
function fetchDataAndUpdateStorage(onSuccess) {
|
10
10
|
// Get the last request time
|
@@ -62,7 +62,7 @@ function processData(storedData, error, newData, onSuccess) {
|
|
62
62
|
// Update the cursor
|
63
63
|
if (newData.length > 0) {
|
64
64
|
var lastRequest = newData[newData.length - 1];
|
65
|
-
cursor = lastRequest.
|
65
|
+
cursor = lastRequest.real_end_time+0.001;
|
66
66
|
localStorage.setItem('builder_apm_cursor', cursor.toString());
|
67
67
|
}
|
68
68
|
} catch(e) {
|
@@ -36,7 +36,7 @@ $(document).ready(function() {
|
|
36
36
|
</script>
|
37
37
|
</head>
|
38
38
|
<body>
|
39
|
-
<h1 id="header">BuilderApm Dashboard</h1>
|
39
|
+
<h1 id="header">BuilderApm Dashboard<span class="version"> (<%= BuilderApm::VERSION %>)</span></h1>
|
40
40
|
<nav id="navbar">
|
41
41
|
<ul>
|
42
42
|
<li><%= link_to 'Dashboard', dashboard_path, class: ("active" if current_page?(dashboard_path)) %></li>
|
@@ -11,17 +11,14 @@ module BuilderApm
|
|
11
11
|
Thread.current["request_id"] = request_id
|
12
12
|
start_time = Time.now.to_f * 1000
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
handle_exception(e, start_time, request_id)
|
18
|
-
raise e
|
19
|
-
end
|
14
|
+
@status, @headers, @response = @app.call(env)
|
15
|
+
|
16
|
+
ensure
|
20
17
|
|
21
18
|
end_time = Time.now.to_f * 1000
|
22
19
|
handle_timing(start_time, end_time, request_id)
|
23
20
|
|
24
|
-
|
21
|
+
[@status, @headers, @response]
|
25
22
|
end
|
26
23
|
|
27
24
|
private
|
@@ -40,17 +37,6 @@ module BuilderApm
|
|
40
37
|
@redis_client.set("builder_apm:Request:#{data[:request_id]}", data.to_json)
|
41
38
|
end
|
42
39
|
end
|
43
|
-
|
44
|
-
def handle_exception(e, start_time, request_id)
|
45
|
-
end_time = Time.now.to_f * 1000
|
46
|
-
|
47
|
-
data = Thread.current['request_data'] || {}
|
48
|
-
data[:exception_class] = e.class.to_s
|
49
|
-
data[:exception_message] = e.message
|
50
|
-
data[:exception_backtrace] = e.backtrace
|
51
|
-
|
52
|
-
handle_timing(start_time, end_time, request_id)
|
53
|
-
end
|
54
40
|
end
|
55
41
|
end
|
56
42
|
end
|
data/lib/builder_apm/version.rb
CHANGED