Publish error count metrics for each of Buildgrid's requests
Before raising this MR, consider whether the following are required, and complete if so:
-
Unit tests -
Metrics -
Documentation update(s)
If not required, please explain in brief why not.
Description
This request aims to publish error count metrics for each of Buildgrid's requests, making use of the ExceptionCounter
decorator. New metric names are created for all of the request types, and ExceptionCounter
extended with the option for ignored_exceptions
that can be used to ignore non-200 responses that are part of a normal request flow, such as NotFound
for Read
.
Changes proposed in this merge request:
- Create new metric names for each request type
- Decorate each request type with
ExceptionCounter
and the specific exceptions to be ignored for that request type - Update unit test that made use of a generic metric name changed to one that was more request specific
- Unit tests to test
ignored_exceptions
option for decorator and context manager variations ofExceptionCounter
Validation
Issues addressed
Closes / Resolves / Addresses (delete as appropriate) issue <e.g. repo-name#x>