rails-profiler 0.27.1 → 0.28.0

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: 979833a1b2c4ee8e9a831541dfdd8441415d8226c84bc8cfcb5d99b719c68626
4
- data.tar.gz: 7df581a3d434892acca1f640b943fc3435fee501dbb0e9b656b404ba73b858cb
3
+ metadata.gz: 43436010e8f0c4e97b8152996bac90d06192e9975ddb3158bbe52281c8d0e32a
4
+ data.tar.gz: ce88d5f1649e87f1e540a44f6752c5c1d8559ef3ef10ea4727aa1e467fd1ca3c
5
5
  SHA512:
6
- metadata.gz: 51b42dbe0a1ff3b867d8cbf61dadd9c20e534936ff53cba67171db20a726f591dd200188fed64825c7d2d1e83aba034251e50c99d6ed1572810b460278e6c23d
7
- data.tar.gz: 2f837c25d831afe1fd55253093bea8b94f7320515c00f25d58d1206c3fc14bad7ad6e304739a898ca6c19e93a3bfce857df5262aad0bade745bf3ce696373ad7
6
+ metadata.gz: f24eb1eea1c94389c4ff9557707f07f8b1f49359178b8c9595684b00593a50b398e7b132c5c5a09c4096c884a6183f7621cf5e48efb4944deac55c9ed71197c8
7
+ data.tar.gz: 7f216e42ddec0d00560b60e3c91a71353826407e11027a41c224e55e6b4633dc143b96b6853fa7a576441ad707d979b02a7fb9d595f74e6206e062cf6fead0c1
@@ -9,7 +9,7 @@ module Profiler
9
9
  :authorization_mode, :max_profiles, :extension_cors_enabled,
10
10
  :cors_allowed_origins,
11
11
  :track_ajax, :ajax_skip_paths,
12
- :track_http, :slow_http_threshold, :http_skip_hosts,
12
+ :track_http, :slow_http_threshold, :http_skip_hosts, :http_backtrace_depth,
13
13
  :track_jobs,
14
14
  :track_console,
15
15
  :track_tests,
@@ -43,6 +43,7 @@ module Profiler
43
43
  @track_http = true
44
44
  @slow_http_threshold = 500 # milliseconds
45
45
  @http_skip_hosts = []
46
+ @http_backtrace_depth = 40
46
47
  @track_jobs = true
47
48
  @track_console = true
48
49
  @track_tests = false
@@ -157,9 +157,11 @@ module Profiler
157
157
  end
158
158
 
159
159
  def self.extract_backtrace
160
- caller_locations(5, 40)
161
- .reject { |l| l.path.to_s.include?("net/http") || l.path.to_s.include?("profiler/instrumentation") }
162
- .map { |l| "#{l.path}:#{l.lineno}:in `#{l.label}`" }
160
+ depth = Profiler.configuration.http_backtrace_depth
161
+ frames = caller_locations(5, depth || 1000)
162
+ .reject { |l| l.path.to_s.include?("net/http") || l.path.to_s.include?("profiler/instrumentation") }
163
+ .map { |l| "#{l.path}:#{l.lineno}:in `#{l.label}`" }
164
+ depth ? frames.first(depth) : frames
163
165
  end
164
166
  end
165
167
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Profiler
4
- VERSION = "0.27.1"
4
+ VERSION = "0.28.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.1
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Duplessy