Added support for metrics.