Currently, when adding histograms, a dev will add an entry in histogram.xml and then write some code to record it, typically with a macro. The histograms.xml change is used to trigger review by metrics team.
This process is error prone, since it's easy to write code that doesn't match the xml, or misuse the macro by using a variable name, or fail to update the xml at all, especially when histogram suffixes are involved.
One way of getting around this would be to do some simple codegen on xml files to generate recording code, and use this for new histograms.
Design doc: https://docs.google.com/document/d/1SsUV0zNa6YFxhZ-fhDoFohyrEo5YL4DCHq2B3OFE4pE/edit#
Comment 1 by holte@chromium.org
, Sep 1 2017