Developer pages

Source maps

Upload .map files with @humanbehavior/wizard so minified production stacks become readable in Issues.

Why

Production bundles are minified. Source maps restore original file names and lines so Issues titles/culprits and fingerprints can key on stable application frames (symbolication runs before fingerprinting on ingest).

Match runtime tags

The SDK stamps these on every error report:

Init optionEnv commonly usedRequired for maps?
releaseHB_RELEASE / app versionYes — upload must use the same string
distHB_DISTOptional discriminator (e.g. web, build id)
commitShaHB_COMMIT_SHAOptional; defaults to git rev-parse HEAD during upload
HumanBehaviorTracker.init(apiKey, {
  release: process.env.NEXT_PUBLIC_APP_VERSION, // e.g. "1.4.2"
  dist: "web",
  commitSha: process.env.NEXT_PUBLIC_GIT_SHA,
});

If release/dist at runtime disagree with the upload, symbolication will not find maps.

Upload CLI

npx @humanbehavior/wizard upload-sourcemaps [dir] [options]

[dir] defaults to the current directory. The command recursively finds every *.map file and POSTs each to:

POST {ingestionUrl}/api/ingestion/sourcemaps
Authorization: Bearer <apiKey>
Content-Type: application/json

Flags and environment variables

FlagEnv varRequiredMeaning
--api-keyHB_API_KEYYesProject API key
--releaseHB_RELEASEYesSame release string as SDK init
--distHB_DISTNoBuild discriminator
--commitHB_COMMIT_SHANoCommit SHA (else git rev-parse HEAD)
--urlHB_INGESTION_URLNoIngestion base (default https://ingest.humanbehavior.co)
--helpPrint usage

Example:

export HB_API_KEY=hb_...
export HB_RELEASE=1.4.2
export HB_DIST=web
npx @humanbehavior/wizard upload-sourcemaps ./dist

Exit codes: non-zero if no .map files are found, or if uploads fail (per-file success/failure is printed).

CI tip

  1. Build with source maps enabled for production artifacts.
  2. Init the SDK with the same release (and dist if used).
  3. Run upload-sourcemaps as a release step against the build output directory.
  4. Do not upload maps for every PR build unless those releases are also what browsers send.

What this does not do

TopicStatus
Automatic webpack/Vite plugin in-repoUse the wizard CLI (or call the HTTP endpoint yourself)
Public browse of uploaded maps in the UIUnknown / not documented here — maps are for ingest-time symbolication
Server-side Node stack symbolicationBrowser error reports only via this path

Verify

  1. Deploy a minified build with a known release.
  2. Upload maps for that release.
  3. Trigger a production error.
  4. Open the Issue — frames should show original paths/lines after symbolication.