Skip to content

Raise an error when calling an unimplemented db metric operation

Michał Wielich requested to merge michold-restrict-dbmetrics-operations into master

What does this MR do and why?

Related to #332553 (closed)

Add a check for database instrumented classes so we can use only implemented operations.

Raise error if an incorrect operation is used.

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

  1. Add a new database instrumentation metric class, following the implementation guide.
  2. Set the operation of the new class to a symbol not listed on our list of supported db metrics operations
  3. The specs for given class should fail, raising the UnimplementedOperationError.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Michał Wielich

Merge request reports