builder_apm 0.5.4 → 0.5.7

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: 3ba1912b1e309f8f3c0f215eaa29be48724f52acfdfd82aa41b5238c739ec3cb
4
- data.tar.gz: b97fad9c760392060531925110503806d57d4ab72402054512006077d391ee08
3
+ metadata.gz: 6bc271cf133a829ee3b3a2301f5630a86218b7e79f5021e621a2a181d246e578
4
+ data.tar.gz: e15fa41c32dc17c81f7c0a510ae4566844fb0fc53bef41cc05d0a2b41b4a0f9d
5
5
  SHA512:
6
- metadata.gz: e401a85d41e465c1845b6a3c5ed98e9b04b906e792549831636b5f7fa5571567fe10e62fc3244d2337d3822d6aa67ddb59583cf8d0e5534e95cb5e84145da807
7
- data.tar.gz: d3bd84d4d9c4c35880e9cb3d30c8bb27af8021223dd6e97ec570b53090741232b07d65b9727345047e2c7ded811cc91446ce631a4e7cefa1abc7767c4ec3c117
6
+ metadata.gz: 8932092c49dd34df98da53f96d5666b7048e7abefd57ac741fcbe514bfce3f972f990e51c20df55d245206014c77e66a2831c1718590d9b98b667e51adf11d83
7
+ data.tar.gz: 67a3dfa59a83e4cdb691c4a12e344cd2ef168baf32e340265a7bce535145c3ed21cce7a765e3a5033b29df324028ef0e456551a898ab5c6a80813682f6e09027
@@ -192,9 +192,16 @@
192
192
  }, 500);
193
193
 
194
194
  function fetchDeeperDiagnosis() {
195
- return $.post('/builder_apm/deeper_analysis', {
196
- request_id: request_id,
197
- files: selectedFiles
195
+ return $.ajax({
196
+ type: 'POST',
197
+ url: '/builder_apm/deeper_analysis',
198
+ data: {
199
+ request_id: request_id,
200
+ files: selectedFiles
201
+ },
202
+ headers: {
203
+ 'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
204
+ }
198
205
  });
199
206
  }
200
207
 
@@ -1,3 +1 @@
1
-
2
- </body>
3
- </html>
1
+ </body></html>
@@ -2,55 +2,56 @@
2
2
  <html>
3
3
  <head>
4
4
  <title>BuilderApm Dashboard</title>
5
- <%= render 'builder_apm/css/main' %>
6
- <%= render 'builder_apm/css/dark' %>
7
- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
8
- <script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.js"></script>
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.css"/>
10
- <%= render 'builder_apm/js/data_fetcher' %>
11
- <script>
12
- $(document).ready(function () { // Check for saved 'darkMode' in localStorage
13
- if (localStorage.getItem('darkMode') === 'true') {
14
- $('body').addClass('dark');
15
- }
5
+ <meta name="csrf-token" content="<%= form_authenticity_token %>">
6
+ <%= render 'builder_apm/css/main' %>
7
+ <%= render 'builder_apm/css/dark' %>
8
+ <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
9
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.js"></script>
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.css"/>
11
+ <%= render 'builder_apm/js/data_fetcher' %>
12
+ <script>
13
+ $(document).ready(function () { // Check for saved 'darkMode' in localStorage
14
+ if (localStorage.getItem('darkMode') === 'true') {
15
+ $('body').addClass('dark');
16
+ }
16
17
 
17
- $('#clearData').on('click', function () {
18
- localStorage.removeItem('builder_apm_requests');
19
- localStorage.removeItem('builder_apm_cursor');
20
- alert('Local Data Cleared');
21
- });
22
- $('#darkModeToggle').on('click', function () {
23
- $('body').toggleClass('dark');
18
+ $('#clearData').on('click', function () {
19
+ localStorage.removeItem('builder_apm_requests');
20
+ localStorage.removeItem('builder_apm_cursor');
21
+ alert('Local Data Cleared');
22
+ });
23
+ $('#darkModeToggle').on('click', function () {
24
+ $('body').toggleClass('dark');
24
25
 
25
- // Save the current mode in localStorage
26
- if ($('body').hasClass('dark')) {
27
- localStorage.setItem('darkMode', 'true');
28
- } else {
29
- localStorage.setItem('darkMode', 'false');
30
- }
26
+ // Save the current mode in localStorage
27
+ if ($('body').hasClass('dark')) {
28
+ localStorage.setItem('darkMode', 'true');
29
+ } else {
30
+ localStorage.setItem('darkMode', 'false');
31
+ }
32
+ });
33
+ $('body').show();
31
34
  });
32
- $('body').show();
33
- });
34
- </script>
35
- </head>
36
- <body>
37
- <h1 id="header">BuilderApm Dashboard<span class="version">
38
- (<%= BuilderApm::VERSION %>)</span>
39
- </h1>
40
- <nav id="navbar">
41
- <ul>
42
- <li><%= link_to 'Dashboard', dashboard_path, class: ("active" if current_page?(dashboard_path)) %></li>
43
- <li><%= link_to 'Request Analysis', request_analysis_path, class: ("active" if current_page?(request_analysis_path)) %></li>
44
- <li><%= link_to '500 Errors', errors_500_path, class: ("active" if current_page?(errors_500_path)) %></li>
45
- <li><%= link_to 'Recent Requests', recent_requests_path, class: ("active" if current_page?(recent_requests_path)) %></li>
46
- <li><%= link_to 'Slow Requests', slow_requests_path, class: ("active" if current_page?(slow_requests_path)) %></li>
47
- <li><%= link_to 'N+1', n_plus_one_path, class: ("active" if current_page?(n_plus_one_path)) %></li>
48
- <li id="dark-mode-toggle">
49
- <button id="darkModeToggle" class="nav-button">Toggle Dark Mode</button>
50
- </li>
51
- </ul>
52
- </nav>
53
- <div id="options">
54
- <input type="checkbox" id="autoUpdate" name="autoUpdate">
55
- <label for="autoUpdate">Load Older data</label>
56
- </div>
35
+ </script>
36
+ </head>
37
+ <body>
38
+ <h1 id="header">BuilderApm Dashboard<span class="version">
39
+ (<%= BuilderApm::VERSION %>)</span>
40
+ </h1>
41
+ <nav id="navbar">
42
+ <ul>
43
+ <li><%= link_to 'Dashboard', dashboard_path, class: ("active" if current_page?(dashboard_path)) %></li>
44
+ <li><%= link_to 'Request Analysis', request_analysis_path, class: ("active" if current_page?(request_analysis_path)) %></li>
45
+ <li><%= link_to '500 Errors', errors_500_path, class: ("active" if current_page?(errors_500_path)) %></li>
46
+ <li><%= link_to 'Recent Requests', recent_requests_path, class: ("active" if current_page?(recent_requests_path)) %></li>
47
+ <li><%= link_to 'Slow Requests', slow_requests_path, class: ("active" if current_page?(slow_requests_path)) %></li>
48
+ <li><%= link_to 'N+1', n_plus_one_path, class: ("active" if current_page?(n_plus_one_path)) %></li>
49
+ <li id="dark-mode-toggle">
50
+ <button id="darkModeToggle" class="nav-button">Toggle Dark Mode</button>
51
+ </li>
52
+ </ul>
53
+ </nav>
54
+ <div id="options">
55
+ <input type="checkbox" id="autoUpdate" name="autoUpdate">
56
+ <label for="autoUpdate">Load Older data</label>
57
+ </div>
@@ -28,15 +28,14 @@ module BuilderApm
28
28
  end
29
29
 
30
30
  def valid_trace_point?(tp)
31
- return false unless Thread.current[:request_id]
32
31
  return false unless tp.path.start_with?(@root_path)
33
- # return false if tp.path.start_with?(@this_gem_path)
32
+ return false unless Thread.current[:request_id]
34
33
 
35
34
  start_controller = Thread.current[:stack]&.first
36
- return false if start_controller && "#{tp.defined_class}##{tp.method_id}" == start_controller[:method]
35
+ start_controller && "#{tp.defined_class}##{tp.method_id}" == start_controller[:method]
37
36
 
38
- gems_to_track = BuilderApm.configuration.gems_to_track
39
- gems_to_track.any? { |gem| tp.path.include?(File::SEPARATOR + gem) }
37
+ # gems_to_track = BuilderApm.configuration.gems_to_track
38
+ # gems_to_track.any? { |gem| tp.path.include?(File::SEPARATOR + gem) }
40
39
  end
41
40
 
42
41
  def process_trace_point(tp)
@@ -1,3 +1,3 @@
1
1
  module BuilderApm
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builder_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Ketelle
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2023-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails