Changes from sf-te

Makes metrics and sentry/raven depend on config.

Needs to be tested on staging.