Limits metrics to Production mode.

Metrics in test or dev mode create problems, and is not useful in any
case.