Skip to content

Add Rubocop rule to make sure we inherit only allowed metric classes

What does this MR do?

Related to #329103 (closed)

This adds a Rubocop cop that checks whether metric instrumentation classes subclass one of the base metric classes:

  • DatabaseMetric
  • GenericMetric
  • RedisHLLMetric

Based on Rubocop::Cop::EnforceSuperclass from rubocop-rails.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Piotr Skorupa

Merge request reports