mozilla / code-review

Automated static analysis & linting bot for Mozilla repositories
Mozilla Public License 2.0
56 stars 42 forks source link

Analyzer health check #278

Open La0 opened 5 years ago

La0 commented 5 years ago

The backend can lists the nb of issues detected per analyzers on the last month, week, day, and detect a trend (or even a zero value).

This could be exposed as a simple read-only api endpoint and consumed by a Taskcluster regular hook that would send email, but also a frontend displaying a small graph.

marco-c commented 5 years ago

Maybe we could use some monitoring service, could be useful across different projects.

La0 commented 2 years ago

We already have the history endpoint that can be filtered by analyzer and check.

For example, to view the list of issues on a day-by-day basis for clang-tidy on diagnostic error, we can use the following request https://api.code-review.moz.tools/v1/check/history/?analyzer=source-test-clang-tidy&check=clang-diagnostic-error&since=2022-07-22

This will provide the payload

[
  {"date":"2022-07-22","total":193},
  {"date":"2022-07-23","total":3},
  ...
]

We can also view the results through the frontend

Screenshot 2022-08-22 at 11-44-22 Mozilla Code Review Bot

marco-c commented 1 year ago

We could rely on Grafana (https://github.com/mozilla/code-review/blob/871f6ba0734d0a64e398255616ec496e8473c4d8/bot/code_review_bot/stats.py)