- Simplified MetricsMiddleware by removing unnecessary comments and focusing on essential request logging.
- Updated RequestLog structure to exclude the Referer field from JSON serialization, enhancing data privacy.
- Removed top referers tracking and associated HTML/CSS elements to declutter the user interface and improve performance.
- Cleaned up CSS styles related to referers for a more streamlined design.
- Improved LogRequest function to correctly increment counts for referers, ensuring accurate tracking of direct and indirect accesses.
- Added MarshalJSON method to SystemMetrics for proper serialization of TopReferers, facilitating better JSON representation of metrics.
- Updated comments for clarity and maintainability, enhancing code readability.
- Streamlined SystemMetrics by removing unnecessary fields and focusing on essential metrics such as AverageLatency and MemoryStats.
- Updated LogRequest to improve handling of referers and average latency calculations, ensuring accurate metrics collection.
- Enhanced the HTML display to include a dedicated section for system metrics, ensuring graceful handling of undefined values.
- Improved the presentation of top referers with a time-based reset mechanism, contributing to a cleaner and more efficient user interface.
- Removed the RecentRequests field from SystemMetrics and its associated logic in LogRequest to streamline metrics collection.
- Updated the HTML to eliminate the recent requests section, focusing on the top referers display for improved performance and clarity.
- Enhanced the overall metrics presentation by ensuring only relevant data is displayed, contributing to a cleaner user interface.
- Introduced global locks to protect concurrent writes to metrics maps in the LogRequest function.
- Ensured thread safety for updating status codes, path latencies, and recent requests, preventing data races.
- Improved overall reliability of metrics logging during high concurrency scenarios.
- Removed the obsolete formatLatency function from metrics.go to simplify the codebase.
- Updated the HTML to utilize the new latency formatting method, ensuring consistent display of average latency metrics.
- Enhanced the LogRequest function to accurately calculate and update average latency based on request counts, improving metrics accuracy.
- Refactored HandleAPIRequest to use a result channel for better error handling and response management.
- Updated metrics logging to directly use the full referer instead of just the main domain, enhancing data accuracy.
- Fixed recent requests display in HTML to correctly format timestamps for better readability.
- Updated latency formatting in Go and JavaScript to display three decimal places for improved precision.
- Enhanced LogRequest function to store only the main domain of the referer, improving data clarity.
- Added MarshalJSON method to SystemMetrics for better JSON representation of request counts.
- Added performance settings to the configuration, including max concurrent requests and caching options.
- Updated API request handling to use context for timeouts and improved logging with Unix timestamps.
- Introduced rate limiting middleware to manage request load effectively.
- Enhanced metrics logging to include atomic counters for request counts and improved data structure for performance metrics.
- Implemented caching for CSV content to optimize data retrieval and reduce load times.
- Added a new function to format latency metrics in both Go and JavaScript for improved readability.
- Updated the LogRequest function to parse and store only the domain of the referer, enhancing data clarity.
- Modified the recent requests and top referers display logic in the HTML to improve performance and maintainability.
- Ensured that the recent requests are displayed in a more user-friendly format, including formatted latency values.
- Implemented detailed logging for API requests, including real IP, referer, and latency metrics.
- Added dynamic routing for handling requests to /pic/ and /video/ endpoints.
- Enhanced error handling for CSV content fetching and improved response messages.
- Updated the HTML and JavaScript to load and display statistics more efficiently, including filtering based on endpoint configuration.
- Introduced new metrics collection logic to only log relevant API requests, optimizing performance and clarity.
- Updated docker-compose.yml to mount logs directory.
- Changed BASE_URL environment variable to point to the new API endpoint.
- Refactored main.go to implement a structured App type, improving initialization and graceful shutdown.
- Enhanced config management with JSON loading and environment variable support.
- Added monitoring capabilities in api_handler for logging request metrics.
- Introduced new metrics display in index.html with corresponding CSS styles for better visualization.