Add support for metrics classes