Refactor sentry_client