feat: N+1 detection, auto-instrumentation, diff, AI explain, and new exports#9
Merged
Conversation
Set FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true at workflow level for both ci.yml and release.yml to silence the actions/checkout@v4 + actions/setup-node@v4 Node 20 deprecation warning. Rename the 'Test with coverage' step to 'Test with coverage gate (>=90%)' to make the threshold explicit. The threshold itself is unchanged — it is enforced via npm run test:coverage which is c8 --check-coverage --lines 90 --functions 90 --branches 90 --statements 90.
…new exports - N+1 and duplicate-work detection (lib/analysis.js) - Auto-instrumentation for pg, mongodb, ioredis, knex, prisma (lib/auto-instrument.js) - Trace diffing with regression detection (lib/diff.js) - AI explanations via OpenAI-compatible endpoints (lib/explain.js) - Markdown, shareable HTML snapshot, and Speedscope exports - New CLI commands: diff, markdown/md, snapshot, explain, speedscope - New HTTP endpoints: /speedscope, /markdown, /snapshot, /trace/diff/:a/:b - Dashboard N+1 warnings and export buttons - Rewrite README in a single consistent voice - Bump version to 2.3.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a set of developer-experience features to node-request-trace and bumps the version to 2.3.0.
New features
lib/analysis.js) — groups semantically identical steps within a request.lib/auto-instrument.js) —pg,mongodb,ioredisviaautoInstrument;knexand Prisma via explicit instance helpers.lib/diff.js) — per-step deltas and regression flag.lib/explain.js) — OpenAI-compatible endpoint, key supplied by user; offline prompt builder included.Surface area
diff,markdown/md,snapshot,explain,speedscope./trace/:id/speedscope,/trace/:id/markdown,/trace/:id/snapshot,/trace/diff/:a/:b.Testing
npm test— 251 passed, 0 failed.npm run lint/npm run typecheck— pass.No runtime dependencies added.