Changes from sf-te

Makes metrics and sentry/raven depend on config.

Tested on staging and enterprise.