Add creation of database metrics to generator

Problem

The generator currently only has support for internal events. This is confusing to our users since there are cases when we need a database metric or some other kind of metric that is not event based and the entry-point to creating those is not clear and there is not the same guidance that the generator offers.

Desired Outcome

We have a single entrypoint (e.g. the generator) to generate any kind of metric whether it's event based or not.

Proposed Solution

  • CLI generates the metric file using an instrumentation_class name chosen by the user
  • CLI generates a barebone Ruby class file with the chosen operation and links the user to documentation (maybe we can use existing generator to help with it?)
  • CLI generates a barebone test file using the a correct instrumented metric value and query test example group
  • Update ...am I in the right place flow in the CLI to account for database metrics
  • Update our documentation, making sure it accounts for adding database metrics with CLI
  • No support for passing optional attributes to the instrumentation class (example) as of now

How to verify

Further actions needed

Edited by 🤖 GitLab Bot 🤖