rails_pulse 0.5.0.pre.2 → 0.5.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: 208274704510167233904a19653cfe5bffcf6f29080344d088e9cbee8c425a87
4
- data.tar.gz: fbbe9e3a6c35a09236a81158d47026a9ab913f1db6e79800b8c71183df4d9d63
3
+ metadata.gz: c3a4671cfd97c14be6772995e98269ab8371d16ab80143d3ae3e79cebb7c82ff
4
+ data.tar.gz: 557942447466d4b8b555b9c398cea09ecf39a5f18cc604acc972ec25f1399abd
5
5
  SHA512:
6
- metadata.gz: 83b22f6771f0c1a99bada73bd60e1af0abb7a7931b5523afa9c1a852c85bf7664d4af32ec025d955ff6db47dfde7c3b2563fee86301d2a7032b0a6f7f1615543
7
- data.tar.gz: '08fd08858f4eafa689a17e92c922623f15f11ff9663de193b3f99830faa59a171bef0a7c5357dbb7bcd2df9afd1ab97f7f6c3ff52ca4cb0f67d7835f11c99730'
6
+ metadata.gz: 10a91ca1ebba8d5baac05e287c1582fa6b98274d36b4666bdd52cea2fd9df7c7cc9724c6c2e43c408725f366761a1be4c0dc1c008aea2d3f129e9e9470fa182e
7
+ data.tar.gz: 2e6d6aadae30d286aceef73717424b3f850ea8ed07b004fd6d6e4a40c431fc6516d0708fd63375598de5bbc4fb56cd775513947274bf13baaea8d19e9b678ab7
data/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.0] - 2026-10-16
11
+
10
12
  ## [0.5.0.pre.2] - 2026-10-11
11
13
 
12
14
  ### Added
@@ -55,6 +55,10 @@ All tools are read-only. Each returns a `summary` and `next_steps`.
55
55
 
56
56
  Every tool that takes a `period` also takes `since` and `until` as ISO 8601 timestamps, read as UTC when no zone is given, and echoes the bounds it measured back as `window`. `period` itself is only `last_hour`, `last_24_hours` or `last_7_days` (plus `all` on `rails_pulse_exceptions`); any other window is `since`/`until`. `rails_pulse_insights` instead reads one whole summary period (`period`: `hour`, `day`, `week` or `month`, and `at` for a time inside it), so its P95s are exact. Use them to compare two fixed windows — the 24 hours before a release against the 24 hours after — rather than a relative period that moves between calls.
57
57
 
58
+ ## Rails Pulse Cloud MCP
59
+
60
+ With Rails Pulse Cloud, a hosted MCP server at `https://mcp.railspulse.com` adds a year of history, deployments and their regression checks, alerts and uptime. Connect it with an MCP key from Profile → API keys, sent as `Authorization: Bearer rpc_…`. Its tools are `rails_pulse_cloud_applications`, `_health`, `_trends`, `_deployments`, `_compare`, `_alerts` and `_uptime`. Each answer's `local` entry names the `rails_pulse_*` tool and arguments that find the same detail locally. If no `rails_pulse_cloud_*` tools are available, ignore this section and the Cloud step below.
61
+
58
62
  ## CLI
59
63
 
60
64
  The `rails-pulse` CLI works without MCP. Append `--json` for structured output.
@@ -87,3 +91,5 @@ Set `RAILS_PULSE_URL` and `RAILS_PULSE_TOKEN` (the application's `config.api_tok
87
91
  5. Inspect SQL and jobs (`rails_pulse_queries`, `rails_pulse_jobs`)
88
92
  6. Correlate with source code: pass the endpoint's `route_id` to `rails_pulse_queries` for the SQL inside it and the file and line each query came from
89
93
  7. Fix, deploy, and re-check the same endpoint
94
+
95
+ With Rails Pulse Cloud connected: detect with `rails_pulse_cloud_health`, understand with `rails_pulse_cloud_deployments` and `rails_pulse_cloud_trends`, investigate with the `local` lookup each one returns, fix, then verify with `rails_pulse_cloud_compare` on the fix's revision. It answers `better`, `worse` or `unchanged` for each metric.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rails-pulse
3
- description: Investigate Rails application performance with Rails Pulse. Use when asked about slow endpoints, regressions after a deploy, expensive or N+1 SQL, error rates, failing background jobs, or whether a performance fix worked. Prefers the rails_pulse_* MCP tools; falls back to the rails-pulse CLI.
3
+ description: Investigate Rails application performance with Rails Pulse. Use when asked about slow endpoints, regressions after a deploy, expensive or N+1 SQL, error rates, failing background jobs, or whether a performance fix worked. Prefers the rails_pulse_* MCP tools; falls back to the rails-pulse CLI. With Rails Pulse Cloud connected, also uses the rails_pulse_cloud_* tools for history, deployments, alerts, uptime and fix verification.
4
4
  ---
5
5
 
6
6
  # Rails Pulse
@@ -36,6 +36,25 @@ All tools are read-only. Each returns a `summary` and `next_steps`.
36
36
  | `rails_pulse_deployments` | Recent deployments with timing, metadata, and whether each one degraded response time or error rate |
37
37
  | `rails_pulse_insights` | What needs attention over one hour, day, week or month, and whether the thresholds fit it |
38
38
 
39
+ ### Rails Pulse Cloud MCP tools (when connected)
40
+
41
+ Rails Pulse Cloud is a hosted MCP server at `https://mcp.railspulse.com`, read with an MCP key. It
42
+ keeps a year of hourly and daily history, every deployment's regression check, alerts and uptime:
43
+ what the application cannot keep or see for itself. It has no SQL values, parameters or
44
+ backtraces. Each answer's `local` entry names the `rails_pulse_*` tool and the exact arguments,
45
+ window included, that find the same route, query, job or exception here. When that window is
46
+ older than 30 days, the local detail may already be deleted, and `local` says so.
47
+
48
+ | Tool | Purpose |
49
+ |------|---------|
50
+ | `rails_pulse_cloud_applications` | Every application and environment: healthy, alerting, not reporting; latest deployment; uptime |
51
+ | `rails_pulse_cloud_health` | One environment against the window before, firing alerts, and what needs attention |
52
+ | `rails_pulse_cloud_trends` | The whole app or one route, query, job or exception over time, or a kind ranked by change |
53
+ | `rails_pulse_cloud_deployments` | Deployments with their regression check: `regressed`, `clean`, `insufficient_data`, `pending` |
54
+ | `rails_pulse_cloud_compare` | Before against after a deployment or a time, per metric `better`, `worse` or `unchanged` |
55
+ | `rails_pulse_cloud_alerts` | Alert rules and their state, and recent alert events |
56
+ | `rails_pulse_cloud_uptime` | Uptime checks, uptime % over 7 and 30 days, and recent outages |
57
+
39
58
  ### CLI
40
59
 
41
60
  The `rails-pulse` executable ships with the gem. Add `--json` for structured output.
@@ -145,6 +164,32 @@ rails_pulse_endpoint(endpoint: "CheckoutController#create", since: "2026-09-25T1
145
164
  Use the deploy time as the boundary, and exclude the minutes around it when a rolling deploy
146
165
  makes them a mix of both versions.
147
166
 
167
+ ## With Rails Pulse Cloud: detect, understand, investigate, fix, verify
168
+
169
+ When the `rails_pulse_cloud_*` tools are available, use Cloud for when and how much, and the local
170
+ tools for why.
171
+ If no `rails_pulse_cloud_*` tools are available, skip this section and use the local workflow
172
+ above. Do not suggest connecting Rails Pulse Cloud unless asked.
173
+
174
+ 1. **Detect.** `rails_pulse_cloud_applications`, then `rails_pulse_cloud_health` for the environment.
175
+ Firing alerts, uptime checks that are down and `needs_attention` say where to look.
176
+ 2. **Understand.** `rails_pulse_cloud_deployments` lines the change up with a release.
177
+ `rails_pulse_cloud_trends` with `kind: "route"` (or `query`, `job`, `exception_group`) and
178
+ `sort: "change"` finds what moved, and it covers windows older than the application keeps.
179
+ 3. **Investigate.** Call the `local` lookup that Cloud returned, with its `since` and `until`, then continue
180
+ with the local workflow above: endpoint, queries, source locations.
181
+ 4. **Fix.** Change the code. Note the revision it ships in.
182
+ 5. **Verify.** Once it is deployed, call `rails_pulse_cloud_compare` with that `revision` (or `at` for
183
+ the time it went live), and the `kind` and `subject` it targeted. `better` is the confirmation.
184
+ `too_early` means no complete hour has passed since the deploy. Ask again at the time it gives.
185
+ When `other_deployments` is not empty, a change may belong to another release.
186
+
187
+ ```
188
+ rails_pulse_cloud_deployments(application: "shop")
189
+ rails_pulse_cloud_trends(application: "shop", kind: "route", sort: "change", range: "7d")
190
+ rails_pulse_cloud_compare(application: "shop", revision: "f1x3d00", kind: "route", subject: "/checkout CheckoutsController#create")
191
+ ```
192
+
148
193
  ## Guidelines
149
194
 
150
195
  - **SQL is not always the cause.** External API calls, serialization, view rendering and application logic slow requests too.
@@ -1,3 +1,3 @@
1
1
  module RailsPulse
2
- VERSION = "0.5.0.pre.2"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pulse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.pre.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Harvey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-11 00:00:00.000000000 Z
11
+ date: 2026-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -650,7 +650,7 @@ metadata:
650
650
  bug_tracker_uri: https://github.com/railspulse/rails_pulse/issues
651
651
  rubygems_mfa_required: 'true'
652
652
  post_install_message: |
653
- Rails Pulse 0.5.0.pre.2 installed.
653
+ Rails Pulse 0.5.0 installed.
654
654
 
655
655
  UPGRADING from any 0.3.x? This release changes route identity and DROPS
656
656
  rails_pulse_routes.method. Back up your database first, then run: