added support for custom metrics