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: d04d7cf30b252d8ce9eb608d7c1dfb103c23d5b125cae40f54668f73af768fb9
4
- data.tar.gz: 92999eb6415744f4290d823400cd6214bd28615267dfc4be0e192510dea2fff3
3
+ metadata.gz: fb49aa255e318beaebed1eb541cd8bf1cf01bd8f5afe9b6ece98323f76952f42
4
+ data.tar.gz: c1f282761fa25d4ab0d9ffcdc0a8f8d29932e0696d20a2cede3342cfb8eee6d6
5
5
  SHA512:
6
- metadata.gz: f9223d0bb63e10a94abcae85fbb97c1b913360eb7a36a172ab678cc179dd22d926b0f65c7764f05d57be2407b3b02907fdb28e16c9d543278c8db2d0c169606e
7
- data.tar.gz: 5ed4d6abf39245db40e7afae0e10cd8295f28c0bd33a4db08e86818ca86054ceca1bca0603b4bf15eecc9db2f615e02d28108fc3c59d0bb91ed91342aa7e5609
6
+ metadata.gz: f9ed786df7a7531c8b79a314069bfcfde5a773520b1a603b605096feff55696bdde7b4aba8ab710e5ef9f11782a41ee391de62f0b5237b0273582d3b396aa5cd
7
+ data.tar.gz: 25fbcc9f411b55dd3aecf5b593b64d776df83f90b06208c7045daeaf16be8c63e5fec2b452ec664ee212b2c8e8ab23c065f8a47ff3722467bbac6a3f0194de8c
@@ -11,7 +11,9 @@ body {
11
11
  padding: 10px;
12
12
  margin-bottom: 20px;
13
13
  }
14
-
14
+ .version {
15
+ font-size:14px;
16
+ }
15
17
  #navbar {
16
18
  background-color: #333;
17
19
  overflow: hidden;
@@ -3,8 +3,8 @@
3
3
 
4
4
  <script>
5
5
  var allData = null;
6
- var isAsc = true;
7
- var current_sort_field = 'start_time';
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.end_time+0.001;
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
- begin
15
- result = @app.call(env)
16
- rescue => e
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
- result
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
@@ -1,3 +1,3 @@
1
1
  module BuilderApm
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Ketelle