Skip to content

Add support for creating multiple files in bulk to metric definitions generator

Gitlab::UsageMetricDefinitionGenerator currently allows only for generation of one metric definition YAML file at a time. This can be slow and frustrating when multiple files have to be generated by a developer.

Proposal

Allow passing multiple key path arguments to the generator to generate multiple metric definitions at the same time, e.g.:

bundle exec rails g gitlab:usage_metric_definition <key_path_1> <key_path_2> <key_path_3> --dir 7d

This would result in generating three metric definitions with different key paths in the correct folder for the weekly time frame.

Edited by Piotr Skorupa