If you refactor your code and change the names of functions or modules, you might want to keep some continuity with the metric names.
@akesling suggested allowing users to specify an alias for each function such that the metrics would be produced with the new and the old function/module names. That way, you could keep using the old name and then transition to the new name later and remove the alias once you've moved everything over.
I like the idea of having a parameter for the macro along the lines of function_alias="other_function_name" or function_aliases=["function_1", "function_2"] and the equivalent for module_alias and module_aliases. We could then duplicate the tracking code so it produces the metrics under all of the given names.
If you refactor your code and change the names of functions or modules, you might want to keep some continuity with the metric names.
@akesling suggested allowing users to specify an alias for each function such that the metrics would be produced with the new and the old function/module names. That way, you could keep using the old name and then transition to the new name later and remove the alias once you've moved everything over.
I like the idea of having a parameter for the macro along the lines of
function_alias="other_function_name"orfunction_aliases=["function_1", "function_2"]and the equivalent formodule_aliasandmodule_aliases. We could then duplicate the tracking code so it produces the metrics under all of the given names.