# Changelog ## 2026-02-19 - 3.0.0 - BREAKING CHANGE(smartmetrics) add system-wide metrics collection, Prometheus gauges, and normalized CPU reporting - Add new sysusage plugin (ts/smartmetrics.sysusage.ts) that reads /proc/stat and /proc/meminfo (with os fallback) and returns system CPU, memory and load averages. - Expose system-wide Prometheus gauges: smartmetrics_system_cpu_percent, smartmetrics_system_memory_used_percent, smartmetrics_system_memory_used_bytes, smartmetrics_system_load_avg_1, smartmetrics_system_load_avg_5, smartmetrics_system_load_avg_15. - Extend IMetricsSnapshot with system fields: systemCpuPercent, systemMemTotalBytes, systemMemAvailableBytes, systemMemUsedBytes, systemMemUsedPercent, systemLoadAvg1, systemLoadAvg5, systemLoadAvg15 (this is a breaking TypeScript API change). - Normalize per-process CPU in pidusage by adding cpuCoreCount and cpuNormalizedPercent and use cpuNormalizedPercent when aggregating CPU across the process tree. - Export the new sysusage plugin from ts/smartmetrics.plugins.ts and wire system metrics into metric collection and Prometheus gauge updates. ## 2026-02-19 - 2.0.11 - fix(deps) bump dependencies, update build script, expand README and npm metadata - Bumped runtime deps: @push.rocks/smartdelay ^3.0.5, @push.rocks/smartlog ^3.1.11 - Updated devDependencies: @git.zone/tsbuild, tsbundle, tsrun, tstest and @types/node versions - Changed build script: "(tsbuild --web)" → "(tsbuild tsfolders)" - Updated npmextra.json: renamed keys (gitzone → @git.zone/cli, tsdoc → @git.zone/tsdoc), added release registries and accessLevel, and added @ship.zone/szci entry - Extensive README improvements: installation notes (pnpm), clearer API docs, examples, added Issue Reporting & Security section and utility docs (formatBytes) ## 2025-06-09 - 2.0.9 - fix(readme) Update documentation with detailed usage instructions, API references and integration examples. - Overhauled README to provide a clearer explanation of SmartMetrics features and API. - Added a quick start guide, detailed examples, and code snippets for various integrations (Express, PM2, custom dashboards). - Reorganized documentation sections to better highlight core concepts including process aggregation and memory limit detection. - Updated installation instructions and usage examples to reflect the latest functionality. ## 2025-06-09 - 2.0.8 - fix(smartmetrics) Refactor metrics calculation and update Prometheus integration documentation - Removed dependency on registry.getMetricsAsJSON by directly calculating Node.js metrics - Updated getMetrics to compute CPU time, heap size, and set default values for deprecated metrics - Enhanced documentation with comprehensive Prometheus integration examples - Improved logging on shutdown of the Prometheus endpoint ## 2025-06-09 - 2.0.7 - Prometheus Metrics Integration feat: Implement Prometheus metrics exposure in SmartMetrics - Added Prometheus gauges for CPU and memory metrics. - Implemented HTTP server to expose metrics at the /metrics endpoint. - Created methods to enable and disable the Prometheus endpoint. - Updated getMetrics() to set gauge values. - Added tests for Prometheus metrics functionality. - Updated documentation plan for Prometheus integration. ## 2023-07-02 to 2023-08-08 - 2.0.0 to 2.0.6 - Maintenance Updates Over this period several releases were published with iterative fixes and minor organizational changes. - Applied multiple core fixes and routine maintenance updates. - Switched to new organization scheme (recorded on 2023-07-10). - Performed several version bumps and configuration updates. ## 2021-08-12 to 2022-07-27 - 1.0.1 to 1.0.17 - Maintenance and Breaking Changes During this interval a series of minor fixes were combined with a significant breaking change. - BREAKING CHANGE: Switched to ESM in 1.0.17 (2022-07-27). - Numerous maintenance updates and core fixes were applied.