Only initialize Sentry when dsn is configured.

This is the next step on the path to disabling Sentry in tasks to
reduce the noise of errors.