2.1.15
🔍 Enhanced Observability Layer
This release introduces a fully updated SQL observability system with deterministic diagnostics, safer failure analysis, and improved tooling for resolver-level profiling.
✨ What’s New
- Deterministic TopSlowest Mode (New Default)
The default mode no longer depends on CLUSTER_STATEMENTS_SUMMARY.
• Logs exact SQL digests executed inside a resolver
• Prints slowest queries with optional EXPLAIN ANALYZE
• Stable diagnostics for long-running workflows
{
topQueries: 2,
showSlowestPlans: true,
}
- Improved SummaryTable Mode (Optional)
summaryTableWindowTime: 15000 // 15s
Now treated as an advanced diagnostic mode.
Automatically falls back to TopSlowest if resolver execution exceeds the window.
- Updated Diagnostics API
executeWithMetadata(fn, onStats, {
mode: "TopSlowest" | "SummaryTable",
summaryTableWindowTime: 15000,
topQueries: 1,
showSlowestPlans: true,
});Gives full control over plan printing, thresholds, and sampling.
- Post-Mortem Analysis for Timeout & OOM
On Timeout or OOM errors, forge-sql-orm now performs an immediate post-mortem lookup:
• Captures the actual failing SQL
• Captures the real TiDB execution plan (no re-execution)
• Fully Forge-safe (metadata only)
Useful for diagnosing severe SQL failures without triggering them again.
- Deprecated Method Temporarily Restored
The deprecated trigger:
topSlowestStatementLastHourTrigger(...)
was restored for backward compatibility.
• Still marked @deprecated
• Internally wraps slowQuerySchedulerTrigger
• Will be removed in a future version
• Not equivalent to the new executeWithMetadata system
• Provided only to support existing apps during migration
Developers are encouraged to migrate to the new observability system:
• TopSlowest mode (default) for deterministic profiling
• SummaryTable mode for advanced use cases
• Automatic fallbacks and reliable post-mortem diagnostics