code-review icon indicating copy to clipboard operation
code-review copied to clipboard

Analyzer health check

Open La0 opened this issue 5 years ago • 3 comments

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.

La0 avatar Nov 28 '19 11:11 La0

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

marco-c avatar Nov 28 '19 14:11 marco-c

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

La0 avatar Aug 22 '22 09:08 La0

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

marco-c avatar Jan 03 '23 16:01 marco-c