CLI
Overview
octri-monitoring uploads the symbolication artifacts that turn unreadable production stack traces into real file names and line numbers. It runs in CI, after your build, before or alongside your deploy.
The CLI does one job: getting symbols to the monitoring service. Specs, SDKs, and docs are managed in the dashboard, not here.
It is also not the CLI generated inside your SDK, which is a command-line client for your own API.
Install
npx @octri/monitoring-cli sourcemaps upload ./distnpx is the right choice in CI. Pin it as a dev dependency if you want the version locked with the rest of your toolchain.
Commands
octri-monitoring sourcemaps upload [paths...] [options]
octri-monitoring sources upload [paths...] [options]| Command | Use it for | Uploads |
|---|---|---|
sourcemaps upload | JavaScript, Dart | *.map files |
sources upload | Go, Rust, Java, Kotlin, Swift | Source files |
paths accepts files or directories and defaults to the current directory. Directories are scanned recursively.
Options
| Flag | Short | Environment variable | Default |
|---|---|---|---|
--url | -u | MONITORING_URL | None |
--token | -t | MONITORING_TOKEN | None |
--environment | -e | MONITORING_ENVIRONMENT | None |
--release | -r | MONITORING_RELEASE | git rev-parse HEAD |
--dry-run | Off | ||
--help | -h |
Flags take precedence over environment variables. The URL, token, and environment all come from your project's monitoring connection, and the token is the same ingest token baked into your generated SDK.
--release has to equal the release your SDK reports at runtime through logging.release. It defaults to git rev-parse HEAD, which is right whenever your SDK also reports the git SHA. A mismatch is silent: the upload succeeds and the traces stay unreadable.
Still read as a fallback so existing pipelines keep working. Move to MONITORING_TOKEN.
Check before you upload
--dry-run lists what would be sent and the release id it resolved, then exits without uploading. The fastest way to catch an empty glob or a wrong release.
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.mapExit codes
| Code | Meaning |
|---|---|
0 | Upload completed, or --dry-run finished |
1 | Missing required options, unknown command, no matching files, or upload failure |
The CLI exits 1 when a path matches no files, so a broken glob fails the build instead of passing quietly.