rails-profiler 0.35.1 → 0.35.3
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 +55 -0
- data/app/assets/builds/profiler-toolbar.js +2 -4454
- data/app/assets/builds/profiler.css +1 -3546
- data/app/assets/builds/profiler.js +14 -9699
- data/app/controllers/profiler/assets_controller.rb +14 -5
- data/app/views/layouts/profiler/application.html.erb +3 -3
- data/app/views/layouts/profiler/embedded.html.erb +7 -5
- data/exe/profiler-mcp +8 -1
- data/lib/profiler/assets.rb +61 -0
- data/lib/profiler/body_content.rb +58 -0
- data/lib/profiler/cluster/master_client.rb +45 -1
- data/lib/profiler/console_profiler.rb +1 -1
- data/lib/profiler/instrumentation/net_http_instrumentation.rb +20 -7
- data/lib/profiler/instrumentation/thread_context_propagation.rb +9 -2
- data/lib/profiler/job_profiler.rb +1 -1
- data/lib/profiler/mcp/server.rb +1 -1
- data/lib/profiler/mcp/tools/get_profile_detail.rb +2 -2
- data/lib/profiler/mcp/tools/get_profile_http.rb +3 -0
- data/lib/profiler/mcp/tools/query_jobs.rb +1 -1
- data/lib/profiler/mcp/tools/run_tests.rb +4 -1
- data/lib/profiler/middleware/profiler_middleware.rb +1 -1
- data/lib/profiler/middleware/toolbar_injector.rb +22 -10
- data/lib/profiler/models/profile.rb +2 -5
- data/lib/profiler/railtie.rb +7 -0
- data/lib/profiler/version.rb +27 -1
- data/lib/profiler.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3e60e3a338360fd499866e03f8ab6c30208f18882a3a13dd892cc04aaac9aca
|
|
4
|
+
data.tar.gz: 0bf4ff094c9b03b179531086676f1077fbcfb3218f402ecc5d5f0677d598dead
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0255bdc1eae2817e7a606d2c76eacd849b91dd30d518eb36a86e8ceb64356ef065c7f87a30f3ea8992866fff47616f5fc6ec3eb1a79fa513bf509dae6553c5a7
|
|
7
|
+
data.tar.gz: 9c5a33a03d2655be62d6d13607b4cf4f09e5322ea84dc2198cf2ef41f61cdc261aa8e56cc5ad6964aff4c8565c82961535ca977b15d3e16f4737f58f8d2ec766
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,60 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.35.3] - 2026-10-17
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **Assets:** The JavaScript and CSS bundles are minified: the toolbar script goes from 177 KB to
|
|
29
|
+
81 KB, the dashboard script from 447 KB to 222 KB and the stylesheet from 91 KB to 79 KB.
|
|
30
|
+
- **Toolbar:** The page interceptor script and the toolbar CSS are read and built once per
|
|
31
|
+
process instead of on every profiled page.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Toolbar:** The toolbar style and the embedded profile layout now carry the request's CSP
|
|
36
|
+
nonce. An application whose policy has `style-src 'nonce-...'` and no `'unsafe-inline'` no
|
|
37
|
+
longer blocks them; without a CSP, no nonce is added.
|
|
38
|
+
- **Assets:** The toolbar and dashboard files (`profiler.js`, `profiler.css`,
|
|
39
|
+
`profiler-toolbar.js`) are now requested as `?v=<digest of the content>` and served for a year
|
|
40
|
+
as immutable, so a browser keeps them between visits and still loads the new ones after an
|
|
41
|
+
upgrade of the gem. The URL without `?v=` still works and is cached for an hour, and an
|
|
42
|
+
asset that is not built still answers the 404 that names `yarn build:full`.
|
|
43
|
+
|
|
44
|
+
## [0.35.2] - 2026-10-17
|
|
45
|
+
|
|
46
|
+
<!-- stamped -->
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- **Performance:** The patch on `Thread#initialize` that carries the profiling context into new
|
|
51
|
+
threads is now installed by the railtie, only when the profiler is `enabled`; a disabled profiler
|
|
52
|
+
no longer touches `Thread`.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **Cluster:** A worker forked from a process that had already started the cluster client (Puma in
|
|
57
|
+
cluster mode with `preload_app!`, a preloaded Unicorn) now gets its own heartbeat thread and
|
|
58
|
+
registers again with the master, through a `Process._fork` hook (Ruby 3.1 and later). Where the
|
|
59
|
+
hook is not available, call `Profiler::Cluster::MasterClient.restart_after_fork` from Puma's
|
|
60
|
+
`on_worker_boot`; see `docs/cluster.md`.
|
|
61
|
+
- **HTTP and request bodies:** A body is now kept as base64 when its bytes are binary (a NUL byte,
|
|
62
|
+
invalid UTF-8, mostly control characters), whatever `Content-Type` it was served with, and `font/`,
|
|
63
|
+
`application/x-protobuf` and `application/gzip` are recognized as binary types. A binary string
|
|
64
|
+
is no longer turned into `?` characters. A body whose `Content-Type` declares a charset other than UTF-8 (`ISO-8859-1`...) stays text, decoded from that charset. A `Net::HTTP` response read as a stream (`read_body`
|
|
65
|
+
with a block) is recorded with no body and `response_body_not_captured`, instead of the `inspect`
|
|
66
|
+
of the stream adapter.
|
|
67
|
+
- **Version:** `Profiler.version`, the version recorded in profiles and announced by the MCP server,
|
|
68
|
+
comes from `git describe` when the gem is mounted by path from a git checkout, so
|
|
69
|
+
`gem_version` is no longer always `0.0.0` there. A published gem keeps the version it was built
|
|
70
|
+
with, and `0.0.0` remains the fallback.
|
|
71
|
+
- **MCP:** The `profiler-mcp` executable reads the profiles the application's file storage wrote
|
|
72
|
+
under `tmp/rails-profiler` in the current directory; it read an empty memory store of its own and
|
|
73
|
+
always answered that there were no profiles.
|
|
74
|
+
- **Profile pages:** the `profiler-version` meta tag of the page layouts now reports `Profiler.version`, the same value the API returns, instead of the raw `Profiler::VERSION` constant. When the gem is mounted from a git checkout, every profile no longer shows a false "different version" warning.
|
|
75
|
+
|
|
22
76
|
## [0.35.1] - 2026-10-17
|
|
23
77
|
|
|
24
78
|
<!-- stamped -->
|
|
@@ -95,6 +149,7 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
95
149
|
(`charset=utf-7`, `charset=internal`) no longer loses its profile; the body is read as UTF-8 with
|
|
96
150
|
invalid bytes replaced.
|
|
97
151
|
|
|
152
|
+
|
|
98
153
|
## [0.34.4] - 2026-10-16
|
|
99
154
|
|
|
100
155
|
<!-- stamped -->
|