Added exporting of metrics