DependencyTrack / DependencyTrack/dependency-track
Complete the metrics exposed by Dependency Track for better monitoring
- Dominant language
- Java
- Stars
- 4.2k
- Forks
- 811
- Avg merge
- 8h 39m
- Merged PRs (30d)
- 237
Description
### Current Behavior:
Since v4.6, Dependency Track expose some metrics using the couple [Micrometer](https://micrometer.io/) and [Prometheus](https://prometheus.io/). Most of the metrics (if not all are directly provided by Alpine framework) and are related to technical components of DT :
- JVM
- ExecutorService
- HikariCP pool
- DataNucleus
- Alpine Event subsystem
It could be interesting for monitoring to add more metrics.
### Proposed Behavior:
I propose the following non exhaustive list of metrics (Feel free to complete, revoke those metrics).
The provided Grafana dashboard should be updated accordingly.
#### Technical
- `http_server_requests_seconds` to track inbound API requests
- `http_client_requests_seconds` to track outbound API requests
- `resilience4j_*` metrics to monitor retry and ratelimiter (i.e. for Snyk) features
- `cache_*` metrics to monitor cache efficiency (size, hit/miss ratio)
- `task_execution` to track the performance of background tasks (time taken)
> **Note**
> 1. Some rework will be needed on the way client request URI are built to have URI pattern to avoid clogging the metrics stream with too many different URIs.
> 2. Notification metric recording is done after subscriptions check (in https://github.com/stevespringett/Alpine/blob/master/alpine-infra/src/main/java/alpine/notification/NotificationService.java#L103) meaning there will be no metrics if there are no subscribers. The metric publication should not be correlated to subscriptions IMHO.
> 3. Some of the metrics above could be implemented in Alpine framework globally
#### Functional (or DT specifics)
I can't think of any or rather they are already implemented in frontend dashboard (# projects, # components,...)
Contributor guide
Assessment
This issue has not been assessed yet.