Skip to Content
OpenPerf

Guides

Releases & source maps

Tag telemetry with a release version, track release health and upload browser source maps.

Tagging telemetry with a release lets OpenPerf track release health (error rate, failed transactions, new errors) and map minified browser stack traces back to your original source files.

Pass release to init

main.ts
import { init } from "@openperf/sdk/browser";

init({
  dsn: import.meta.env.VITE_OPENPERF_DSN,
  release: "1.4.0",
});

Use up to 200 characters without spaces or slashes (for example a semver tag or commit SHA).

Create the release in CI

Run openperf releases create after your build. It attaches the project and commit SHA to the release:

npx openperf releases create --ref "$(git rev-parse HEAD)"

Run it once per project with the same version to group a frontend and API under one release.

Upload browser source maps

Build with source maps enabled, then upload the output folder:

npx openperf sourcemaps upload dist

If files are served under a subpath (e.g. /static/app.js), pass --url-prefix "~/static". Full flags and CI env vars are in the CLI reference.

GitHub Actions example

.github/workflows/deploy.yml
jobs:
  release:
    runs-on: ubuntu-latest
    env:
      OPENPERF_URL: https://api.example.com
      OPENPERF_AUTH_TOKEN: ${{ secrets.OPENPERF_AUTH_TOKEN }}
      OPENPERF_PROJECT: ${{ vars.OPENPERF_PROJECT }}
      OPENPERF_RELEASE: ${{ github.sha }}
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 24
      - run: npm ci && npm run build
      - run: npx openperf releases create --ref "$GITHUB_SHA"
      - run: npx openperf sourcemaps upload dist

Notes

  • Exact version match: the release passed to init must match OPENPERF_RELEASE / --release exactly.
  • Upload before traffic: source maps are applied at ingest time — errors that arrive before the upload keep minified stacks.
  • Browser only: source maps apply to browser errors; server stack traces already carry file paths.

On this page