rails-profiler 0.41.0 → 0.43.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 +4 -4
- data/CHANGELOG.md +27 -0
- data/app/assets/builds/profiler.js +13 -12
- data/app/controllers/profiler/api/compare_controller.rb +42 -0
- data/app/controllers/profiler/application_controller.rb +9 -0
- data/app/controllers/profiler/compare_controller.rb +14 -0
- data/app/views/profiler/compare/show.html.erb +6 -0
- data/config/routes.rb +5 -0
- data/lib/profiler/alerts/sql_redaction.rb +41 -0
- data/lib/profiler/alerts/webhook.rb +62 -0
- data/lib/profiler/alerts/worker.rb +84 -0
- data/lib/profiler/alerts.rb +199 -0
- data/lib/profiler/configuration.rb +36 -1
- data/lib/profiler/mcp/server.rb +15 -0
- data/lib/profiler/mcp/tools/compare_profiles.rb +158 -0
- data/lib/profiler/peers/peer_proxy.rb +83 -0
- data/lib/profiler/peers.rb +142 -0
- data/lib/profiler/profile_comparison.rb +44 -0
- data/lib/profiler/profile_diff.rb +253 -0
- data/lib/profiler/railtie.rb +2 -0
- data/lib/profiler/version.rb +1 -1
- data/lib/profiler.rb +6 -0
- metadata +13 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f56117e3f0074f2373965bdcd9424ba51d53ccb58fc150826ef4e76c8f387b69
|
|
4
|
+
data.tar.gz: 4003700e30187467f5642d7731f75253655b53eee39d4435a617b41f3b7b0bfa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8bdb227c96e7ccf65bf6415965dee2b10348dfc8a056d7ddc1b77bbe1e0aa81d56b84fbb10e8656991cee6a6de07d27dac20b63d2b2797abc432a0de276fb8c
|
|
7
|
+
data.tar.gz: 4f372a6f1ce65c7735233f0c629dfbbce3fea31023dfb3ca7f4d9172d75c912fe597b8d3c3390acbe5b28c911107c3400397c5a1507b9ab2d17c1ae52f3d653c
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,33 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.43.0] - 2026-10-20
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **Alerts:** The new `config.alerts_enabled` (default `false`) turns on threshold alerts. Each profile
|
|
29
|
+
saved that crosses `slow_query_threshold`, `max_queries_warning` or
|
|
30
|
+
`allocated_objects_warning_threshold`, or that repeats a normalized SQL statement (an N+1), is handed to
|
|
31
|
+
the `config.on_detection` block and, when `config.alert_webhook_url` is set, POSTed there as generic JSON
|
|
32
|
+
(see `docs/configuration.md` for the payload). The checks run on one worker thread with a bounded queue (a full queue drops and logs the check), never delay the
|
|
33
|
+
request, and their failures are logged. A profile saved again is not alerted again for a type already delivered,
|
|
34
|
+
and the `path` of a console profile is `null` in the payload. `config.alert_webhook_url=` raises `ArgumentError`
|
|
35
|
+
for a URL that is not http(s) with a host, or that carries credentials. An alert carries the normalized SQL and a fingerprint, never a body
|
|
36
|
+
or a parameter; SQL literals (quoted strings with a backslash or a doubled quote, double quoted text,
|
|
37
|
+
comments, dollar-quoted bodies) are removed from the statement, and a statement whose literals cannot be
|
|
38
|
+
read with certainty is cut before the first one.
|
|
39
|
+
|
|
40
|
+
## [0.42.0] - 2026-10-20
|
|
41
|
+
|
|
42
|
+
<!-- stamped -->
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- **Compare:** `compare_profiles` (MCP) and the dashboard's Compare page diff two profiles: total duration, allocations, cache hit rate, rendered views, and SQL queries grouped by normalized statement into new, gone and slower blocks.
|
|
47
|
+
- **Compare:** each of the two profiles can come from another instance: `config.peers = [{ name:, url: }]` is an explicit allow list (empty by default, so no outgoing call), `config.peer_token` is sent in the `X-Profiler-Peer-Token` header and, on the serving instance, opens `GET /_profiler/api/profiles/:token` only. A URL from a request or a tool argument is never called, and an unknown node is refused with an error. `node_a` and `node_b` pick the node, in the MCP tool and with a selector per profile in the dashboard.
|
|
48
|
+
|
|
22
49
|
## [0.41.0] - 2026-10-20
|
|
23
50
|
|
|
24
51
|
<!-- stamped -->
|