DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.71k stars 579 forks source link

Complete the metrics exposed by Dependency Track for better monitoring #2110

Open syalioune opened 2 years ago

syalioune commented 2 years ago

Current Behavior:

Since v4.6, Dependency Track expose some metrics using the couple Micrometer and Prometheus. Most of the metrics (if not all are directly provided by Alpine framework) and are related to technical components of DT :

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

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,...)

nscuro commented 1 year ago

Raising to p2 as this becomes increasingly more important to debug performance issues users may run into.

We can currently only roughly pinpoint bottlenecks or blocking tasks, using the event system metrics. However, that's not all that useful when being confrontend with "BOM upload processing takes too long, what is the blocker?".

A few metrics that come to mind that would be good to collect:

BOM / VEX processing

Vulnerability analysis

Policy Evaluation

Metrics Updates

Mirroring

Repository Meta Analysis