Split Sentry functionality into a helper