Get your first trace on screen in about five minutes. This guide covers the local standalone runtime, cloud dashboard paths, and the minimum configuration for Guard-integrated capture.
Choose your path
| Path | Time | Best for |
|---|---|---|
| Local standalone | ~3 min | Offline dev, CI smoke tests, no Cartographer stack |
| Manual CI ingest | ~10 min | Custom pipelines; Cartographer runner with @molar/trace-capture |
Most production teams will use Guard auto-capture once wired; today use Cartographer runner capture or manual ingest.
Cloud — first trace via ingest
When Guard auto-capture ships, every check will produce a trace row automatically. Until then:
Step 1 — Confirm ingest access
- Open app.molar.it → Settings → Tokens — mint an API key with
traces:write - Or attach
@molar/trace-capturein a Cartographer/Playwright runner (see Workers & ingestion) - Note your org slug for API calls
Step 2 — Produce a trace
Upload a bundle via API (POST /v1/traces/ingest) or run a scenario with capture attached.
Step 3 — Open the trace
| Surface | URL |
|---|---|
| Trace list (SKU) | https://trace.molar.it/traces |
| Trace detail (SKU) | https://trace.molar.it/traces/{trace_id} |
| Full forensic viewer | https://app.molar.it/trace/{trace_id} |
| Combined hub widget | app.molar.it → Recent failures → Open in Trace |
| Public permalink | https://app.molar.it/r/{shortId} |
Failed checks will deep-link from GitHub check annotations when Guard integration ships. Open the trace and select the failing step manually today.
Step 4 — Explore
On app.molar.it/trace/{id} (full UI):
- Scrub the five ribbons (STEP, NETWORK, DOM, CONSOLE, AGENT)
- Open the Overview tab for failure signature and source check link
- Press
Dfor Debugger · Share for permalink
On trace.molar.it (SKU viewer today): Events, Video, Debugger, Share, and pin.
Next: Trace detail for the full viewer tour.
Local standalone
Note:
Self-hosted operators only. Molar Cloud customers use app.molar.it/trace — no local runtime required.
The standalone Trace package runs a self-contained runtime without Cartographer, Guard, or cloud dependencies. Use it for local development, smoke tests, and CI verification.
Prerequisites
- Node.js 20+
npmorpnpm
Install and run
Download the standalone Trace bundle from your Molar account portal (or contact support@molar.it), then:
npm install
TRACE_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef npm run dev
Open http://localhost:4173.
| Route | Purpose |
|---|---|
/ | Home — search and recent traces |
/runs or /traces | Trace list |
/runs/{id} or /traces/{id} | Trace detail viewer |
The standalone server uses x-molar-org header for tenant scoping in tests and smoke runs.
Optional data directory
Persist traces across restarts:
TRACE_DATA_DIR=/tmp/molar-trace-dev \
TRACE_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef \
npm run dev
Verify the install
npm test
npm run test:browser
npm run smoke
Molar Cloud Trace runs on the same API and dashboard as Cartographer and Guard. The standalone package is the lightweight path for local build/verify without the full stack.
Dashboard paths (cloud)
Trace uses /traces as the canonical route — not /runs. Legacy /runs URLs redirect with 301.
| Page | Route | Description |
|---|---|---|
| Trace list | /traces | Primary working surface — filters, saved views |
| Trace detail (full UI) | /trace/{id} | Five ribbons, nine tabs, replay modal (app.molar.it) |
| Trace detail (SKU) | /traces/{id} | Events, video, Debugger (trace.molar.it) |
| Public share | /r/{shortId} | Read-only viewer (no login) |
| Embed | /r/{shortId}/embed | Minimal iframe viewer |
Query params on trace detail:
| Param | Example | Effect |
|---|---|---|
tab | ?tab=debugger | Open inspector tab |
step | ?step=7 | Select failing step |
mode | ?mode=dom | Viewer mode: video, dom, source |
debugger | ?debugger=1 | Expand Debugger tab |
Combined-mode users arrive from app.molar.it with a shared session cookie on .molar.cloud.
First trace in five minutes (manual ingest)
If Guard is not wired yet, upload a Playwright trace bundle manually.
Step 1 — Run a Playwright test with tracing
import { test } from "@playwright/test";
test("checkout smoke", async ({ page, context }) => {
await context.tracing.start({ screenshots: true, snapshots: true });
await page.goto("https://staging.example.com/checkout");
// ... test steps ...
await context.tracing.stop({ path: "trace.zip" });
});
Step 2 — Upload to Trace
curl -X POST "$TRACE_API/v1/traces/ingest" \
-H "Authorization: Bearer $MOLAR_API_KEY" \
-F "bundle=@trace-bundle.tar.zst" \
-F "scenario_slug=checkout-stripe" \
-F "source=manual" \
-F "commit_sha=$(git rev-parse HEAD)"
Replace $TRACE_API with https://api.molar.it/trace and $MOLAR_API_KEY with an org API key (Settings → Tokens, scope traces:write).
Step 3 — Open in dashboard
The response includes id and short_id. Navigate to:
https://trace.molar.it/traces/{id}
Postprocess completes in seconds — P99 ingest to viewable is ~2.4s.
Environment variables
Local standalone
| Variable | Required | Default | Description |
|---|---|---|---|
TRACE_ENCRYPTION_KEY | Yes | — | 32-byte hex key for encrypting stored credentials |
TRACE_DATA_DIR | No | OS temp | Directory for local trace artifacts |
PORT | No | 4173 | HTTP listen port |
TRACE_API_HOST | No | 0.0.0.0 | Bind address |
Capture library (Guard / Cartographer runner)
| Variable | Required | Default | Description |
|---|---|---|---|
MOLAR_TRACE_API | For live ship | — | Trace API base URL (e.g. https://api.molar.it/trace) |
MOLAR_INTERNAL_TOKEN | For live ship | — | Service token for ingest auth |
MOLAR_TRACE_OUT | No | OS temp | Local output dir before upload |
MOLAR_RUN_ID | No | auto | Explicit run ID for correlation |
Cloud / self-hosted API
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | For Debugger | LLM provider key (org BYOK supported) |
S3_BUCKET_TRACES | Yes (cloud) | Object store bucket for trace artifacts |
DATABASE_URL | Yes (cloud) | Postgres connection string |
REDIS_URL | Yes (cloud) | Queue backing for postprocess + Layer 2 |
NEXT_PUBLIC_TRACE_SHARE_BASE | No | Permalink host override (default app.molar.it) |
Scenario privacy (.molar.md frontmatter)
Configure per-scenario — not env vars:
privacy:
mask_inputs: true
mask_text: ".pii, .email"
block: ".secrets-panel"
network_redact:
- "$.user.email"
See Security for PII handling details.
CLI shortcuts
# Open latest failed trace in browser (requires molar CLI + auth)
molar trace open --failed
# Open specific trace by short ID
molar trace open xY9zQ2mNp
What to do next
| Goal | Page |
|---|---|
| Triage failures at scale | Trace list |
| Master the viewer | Trace detail |
| Ask Debugger + Layer 2 replay | Debugger & replay |
| Wire Guard → Mender | Mender hand-off |
| CI + Slack + MCP | Integrations |
Demo trace: Open the demo trace on app.molar.it/trace — a pre-loaded failure at step 7 with webhook 404 signature (demo fixture when API is down).