Skip to content

Add Prometheus metric that counts number of catched errors

Tomasz Maczukin requested to merge improvement/add-errors-number-metric into master

What does this MR do?

Adds a new Prometheus metric that counts the number of errors. Counting is done by logrus hook and it generates metrics like:

# HELP ci_runner_errors The  number of catched errors.
# TYPE ci_runner_errors counter
ci_runner_errors{level="error"} 0
ci_runner_errors{level="fatal"} 0
ci_runner_errors{level="panic"} 0
ci_runner_errors{level="warning"} 7

Why was this MR needed?

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Closes #2041 (closed)

Merge request reports