Octri

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.

Scope

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
npx @octri/monitoring-cli sourcemaps upload ./dist

npx 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

bash
octri-monitoring sourcemaps upload [paths...] [options]
octri-monitoring sources    upload [paths...] [options]
CommandUse it forUploads
sourcemaps uploadJavaScript, Dart*.map files
sources uploadGo, Rust, Java, Kotlin, SwiftSource files

paths accepts files or directories and defaults to the current directory. Directories are scanned recursively.

Options

FlagShortEnvironment variableDefault
--url-uMONITORING_URLNone
--token-tMONITORING_TOKENNone
--environment-eMONITORING_ENVIRONMENTNone
--release-rMONITORING_RELEASEgit rev-parse HEAD
--dry-runOff
--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.

The release must match your 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.

MONITORING_INGEST_TOKEN is deprecated

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.

bash
octri-monitoring sourcemaps upload ./dist --dry-run
text
[dry-run] would upload 3 map(s) for release 9f2c1ab:
  dist/index.js.map
  dist/vendor.js.map
  dist/runtime.js.map

Exit codes

CodeMeaning
0Upload completed, or --dry-run finished
1Missing 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.

Troubleshooting