CLI
Source maps
For toolchains that minify: JavaScript and Dart. Your build emits .map files that map mangled frames back to your original source, and this uploads them.
octri-monitoring sourcemaps upload [paths...] [options]paths defaults to the current directory and is scanned recursively for *.map.
Typical use
octri-monitoring sourcemaps upload ./dist \
--url https://monitoring.example.com \
--environment "$MONITORING_ENVIRONMENT" \
--release "$GIT_SHA"With MONITORING_URL, MONITORING_TOKEN, and MONITORING_ENVIRONMENT in the environment, this collapses to:
octri-monitoring sourcemaps upload ./distThe release defaults to git rev-parse HEAD.
Your build has to emit maps
export default {
build: { sourcemap: true },
};Upload before you clean up
Many pipelines build, deploy, and discard the workspace. If the upload runs after the artifacts are gone, it finds nothing and exits 1. Put it immediately after the build step. See CI setup.
Then delete them from the bundle
Uploading maps to Octri makes traces readable in the dashboard. Serving those same files from your public web server hands your original source, comments and all, to anyone who opens devtools.
Upload them, then remove them from what you deploy.
Most hosts let you exclude them at deploy time. If yours doesn't, delete them after the upload:
octri-monitoring sourcemaps upload ./dist
find ./dist -name '*.map' -deleteDart
Dart minifies for release builds, so Dart is a sourcemaps language, not a sources one, despite compiling.
Verify first
octri-monitoring sourcemaps upload ./dist --dry-run[dry-run] would upload 3 map(s) for release 9f2c1ab:
dist/index.js.map
dist/vendor.js.map
dist/runtime.js.mapCheck the release matches what your SDK reports before you rely on it.