Guides

Releases and sentry-cli

Uncaught implements the part of Sentry's API that sentry-cli and Sentry's bundler plugins use. Create releases, mark deploys and upload source maps from CI with the tools you already know.

API tokens

CI authenticates with an organization API token. An owner or admin creates one under Settings → API tokens in Uncaught. It's shown once, so copy it into your CI's secrets right away. A token works for every project in the organization, and you can revoke it from the same page.

Point sentry-cli at Uncaught

Set these variables in your CI. The organization and project are the slugs from their URLs in Uncaught:

Environment
SENTRY_URL=https://uncaught.thistinct.tools/
SENTRY_ORG=your-organization
SENTRY_PROJECT=your-project
SENTRY_AUTH_TOKEN=uncaught_…

Then check the connection:

Terminal
npx @sentry/cli releases list

Create a release

Use the same version string your SDK sends as release, often the commit SHA. A typical deploy job looks like this:

Terminal
export RELEASE=$(git rev-parse --short HEAD)

npx @sentry/cli releases new "$RELEASE"
npx @sentry/cli sourcemaps inject ./dist          # JavaScript only
npx @sentry/cli sourcemaps upload --release "$RELEASE" ./dist
npx @sentry/cli releases finalize "$RELEASE"
npx @sentry/cli releases deploys "$RELEASE" new -e production

Finalizing a release, or marking a deploy, records when it went out. Errors from it show up on the release's page in Uncaught, along with the issues it introduced.

GitHub Actions

.github/workflows/deploy.yml
- name: Create a release in Uncaught
  env:
    SENTRY_URL: https://uncaught.thistinct.tools/
    SENTRY_ORG: your-organization
    SENTRY_PROJECT: your-project
    SENTRY_AUTH_TOKEN: ${{ secrets.UNCAUGHT_AUTH_TOKEN }}
  run: |
    npx @sentry/cli releases new "$GITHUB_SHA"
    npx @sentry/cli sourcemaps inject ./dist
    npx @sentry/cli sourcemaps upload --release "$GITHUB_SHA" ./dist
    npx @sentry/cli releases finalize "$GITHUB_SHA"

What's supported

Commands for features Uncaught doesn't have, like releases set-commits, debug files and cron monitors, aren't supported. Leave them out of your scripts.