-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monitoring bug fixes and enhancements (#239)
* Add Prometheus metrics and improve configurability Introduced Prometheus counters for tracking application version and CVE counts. Made metrics write interval configurable via application properties. Applied minor refactorings to enhance maintainability and flexibility. * Update metrics, add application name, and improve docs Updated metrics to include application name and version. Enhanced documentation with memory optimization tips and added a new environment variable for metrics configuration. Upgraded Prometheus library to version 1.3.5, and removed redundant code in `CveCommand`. * Remove TaskSchedulingAutoConfiguration import This change removes the unnecessary import of TaskSchedulingAutoConfiguration, simplifying the configuration and potentially reducing overhead. The scheduling functionality remains intact due to the @EnableScheduling annotation. * Clarify units for `METRICS_WRITE_INTERVAL` in README. Updated the `METRICS_WRITE_INTERVAL` description to specify that the update interval is measured in milliseconds. This improves the clarity of the documentation and avoids potential confusion for users. * Rename and update CVE metric gauges for clarity. Renamed the existing CVE counter to `CVE_LOAD_COUNTER` and introduced a new `CVE_COUNTER` to differentiate between loaded and cached CVE counts. Updated logic to set the new `CVE_COUNTER` value based on cached CVEs. * Refactor metric builder formatting for readability Consolidate and reformat metric builder initialization to improve code readability and maintain consistency across the Application and CveCommand classes. This change does not modify functionality but simplifies line breaking for better clarity.
- Loading branch information
1 parent
3279b37
commit 7e207f5
Showing
6 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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