Add the metrics implementation.