Added support for capturing metrics using statsd.