- Implement status code statistics tracking in Collector
- Update PathMetrics type to use pointer-based access
- Enhance atomic operations for request and error count tracking
- Modify type assertions to use pointer-based type conversion
- Restructure Collector to use more efficient atomic operations
- Remove complex caching and monitoring dependencies
- Simplify path and status code tracking with sync.Map
- Optimize request logging with a dedicated request queue
- Remove unnecessary utility functions and pools
- Streamline stats generation and reduce complexity
- Added new performance monitoring settings in the configuration, including maximum requests per minute and data transfer limits.
- Introduced validation parameters for metrics, ensuring data integrity and consistency checks during collection.
- Refactored the metrics collector to streamline initialization and improve error handling.
- Removed deprecated database-related code and optimized metrics saving processes.
- Enhanced historical data management with regular clean-up routines to maintain performance.
These changes improve the configurability and reliability of the metrics system, ensuring accurate data handling and enhanced monitoring capabilities.
- Added new performance monitoring thresholds for maximum requests and data transfer rates.
- Introduced dynamic save interval adjustments based on data change rates to optimize database writes.
- Implemented a retry mechanism for loading recent statistics, improving reliability in data retrieval.
- Consolidated metrics saving into a single method, SaveAllMetrics, to streamline database transactions and improve performance.
- Enhanced error handling and logging throughout the metrics collection process for better monitoring.
These changes improve the efficiency and reliability of the metrics system, ensuring more accurate and timely data collection.
- Replaced the deprecated loadRecentStatusStats function with a new LoadRecentStats method in the MetricsDB, consolidating recent statistics loading for status codes, paths, and referers.
- Improved error handling and logging for loading recent stats, enhancing monitoring capabilities.
- This refactor simplifies the codebase and improves the efficiency of metrics collection, ensuring more accurate and timely data retrieval.
- Updated CSS styles for the metrics dashboard, improving layout with flex properties and enhanced item presentation.
- Modified the status code display to use a more organized structure, allowing for better alignment and spacing.
- Changed the data type for avgLatency in SaveMetrics to int64 for consistency.
- Implemented a context with timeout for database queries in GetRecentMetrics, improving performance and reliability.
- Optimized SQL queries to limit result sets and enhance data retrieval efficiency.
These changes improve the user experience and data presentation in the metrics dashboard, providing clearer insights into performance metrics.
- Changed text color in the metrics dashboard from white to black for better visibility.
- Modified the layout of status codes to display in a row with improved alignment and spacing.
- Enhanced CSS styles for the metrics dashboard, including adjustments to flex properties and background settings.
- Updated SQL query in GetRecentMetrics to sort status codes, ensuring a more organized display of metrics.
These changes improve the user experience and data presentation in the metrics dashboard, providing clearer insights into performance metrics.
- Implemented a new function to load recent status statistics from the database, enhancing the collector's ability to track real-time metrics.
- Added error logging for failed status stats loading to improve monitoring and debugging capabilities.
- Moved database transaction optimization settings outside of the transaction scope in SaveMetrics, improving performance during metric saving operations.
- Updated SQL queries in GetRecentMetrics to streamline time filtering logic, ensuring accurate retrieval of recent metrics.
These changes enhance the metrics collection process and improve the overall performance and reliability of the metrics dashboard.
- Enhanced CSS styles for the metrics dashboard, improving layout and visual presentation with new flex properties and background adjustments.
- Modified the SQL query in GetRecentMetrics to include an additional interval parameter, ensuring more accurate data retrieval for recent metrics.
- These changes improve the user experience and data accuracy in the metrics dashboard, providing a more robust framework for performance monitoring.
- Introduced new constants for data retention periods, specifying retention for metrics, status codes, paths, and referers to improve data management.
- Updated the MetricsHistoryHandler to accept floating-point hours for more precise time queries, enhancing the flexibility of historical data retrieval.
- Enhanced the metrics dashboard layout with additional CSS styles for better visual presentation and user experience.
- Improved error handling in the response writing process to ensure robust logging of connection issues.
- Implemented a new function to check for connection closure errors, improving the reliability of the proxy handler.
These changes significantly enhance the metrics collection, retention, and user interface, providing a more robust framework for performance monitoring and data analysis.
- Improved the metrics dashboard layout with new styles for better visual presentation, including enhanced chart and control elements.
- Added functionality for auto-refreshing metrics and exporting data to CSV, improving user interaction and data accessibility.
- Implemented persistent statistics tracking in the collector, allowing for historical data retrieval and better performance monitoring.
- Enhanced database operations with optimizations for saving metrics and cleaning up old data, ensuring efficient data management.
- Introduced performance metrics tracking, providing insights into average response times and throughput.
These changes significantly enhance the usability and functionality of the metrics dashboard, providing a more robust framework for performance monitoring and data analysis.
- Updated the SQL query in GetRecentMetrics to adjust the time filtering logic, ensuring that only metrics within the specified hours are retrieved.
- This change enhances the accuracy of the metrics data by correctly bounding the time range, improving the reliability of performance monitoring.
- Added functionality to save full metrics periodically and on application shutdown, improving data persistence.
- Introduced new database tables for performance metrics, status code history, popular paths, and referer history, enhancing data tracking capabilities.
- Updated the GetRecentMetrics function to utilize window functions for more accurate metrics retrieval and ensure non-negative values.
- Improved data handling by ensuring empty records are returned instead of null when no metrics are available.
These changes significantly enhance the metrics collection and storage process, providing a more robust framework for performance monitoring.
- Increased the bottom margin of charts in the metrics dashboard for improved visual spacing.
- Added titles to the charts for better context and understanding of displayed data.
- Introduced composite indexes in the database to optimize aggregation queries and improve performance.
- Modified the SQL query in GetRecentMetrics to calculate incremental changes in metrics, enhancing data accuracy and usability.
These changes improve the user experience by providing clearer visualizations and more efficient data retrieval in the metrics dashboard.
- Updated the metrics chart rendering logic to reverse the data order for a more intuitive time progression from left to right.
- Introduced chart options to ensure the x-axis is not reversed, improving the clarity of time-based data visualization.
- Modified the updateChart function to accept additional options, allowing for more flexible chart configurations.
- Added a safeguard in GetRecentMetrics to return a default empty record instead of null when no metrics are available, enhancing data reliability.
These changes improve the user experience by providing clearer visualizations and ensuring consistent data handling in the metrics dashboard.
- Modified the SQL query in GetRecentMetrics to utilize the 'localtime' modifier for timestamp handling, ensuring that metrics are retrieved based on the local time zone.
- This change enhances the accuracy of the metrics data by aligning the time calculations with local time, improving the reliability of performance monitoring.
- Changed AvgLatency field type from int64 to float64 in HistoricalMetrics for better precision in latency measurements.
- Updated SQL query in GetRecentMetrics to ensure proper averaging of AvgLatency by casting to float, enhancing accuracy in metrics reporting.
- These changes improve the reliability of metrics data and ensure more accurate performance monitoring.
- Added initTables function to create necessary tables for metrics history, status statistics, and path statistics in the database.
- Implemented indexing on timestamp columns to enhance query performance.
- Introduced a cleanupRoutine function to periodically delete old metrics data based on retention policies, improving database management.
- Integrated logging for cleanup operations to monitor success and errors during the cleanup process.
- Changed the SQLite driver from "sqlite3" to "sqlite" in the NewMetricsDB function for improved compatibility with the new driver.
- This change aligns with the recent dependency update to modernc.org/sqlite, enhancing performance and stability.
- Replaced `github.com/mattn/go-sqlite3` with `modernc.org/sqlite` for improved compatibility and performance.
- Updated `go.mod` and `go.sum` to include several indirect dependencies for enhanced functionality and stability.
- Refactored import statements in `metrics.go` and `db.go` to reflect the new SQLite driver.
- Added new dependency on github.com/mattn/go-sqlite3 for improved metrics storage.
- Updated main.go to initialize metrics collector with a new database path and configuration settings.
- Enhanced config.json to include additional metrics settings such as alert configurations and latency thresholds.
- Refactored internal metrics handling to support new metrics structures and improve data retrieval.
- Introduced a new metrics history endpoint for retrieving historical data, enhancing monitoring capabilities.
- Improved UI for metrics dashboard to include historical data visualization options.