Produce and configure the sentry client.

def _setup_sentry_client(context):
    """Produce and configure the sentry client."""

    # get_secret will be deprecated soon
    dsn = os.environ.get("SENTRY_DSN")
    try:
        client = raven.Client(dsn, sample_rate=SENTRY_SAMPLE_RATE)
        client.user_context(_sentry_context_dict(context))
        return client
    except:
        rlogger.error("Raven client error", exc_info=True)
        return None