uberprompt init
Create the trace-ingestion collections and indexes required by the pipeline.
Usage
bash
uberprompt initConnects to the MongoDB database in MONGODB_URI and creates the following if they don't exist:
Collections:
spans: raw OpenTelemetry spans, one per LLM call or tool executiontraces: rollup documents, one per root operation (derived from spans via$merge)
Indexes:
traces.traceId: unique, required for the$mergerollup to be idempotentspans.traceId+spans.startTime: compound, for span lookupsspans.spanId: unique
Without the unique traceId index on traces, the rollup pipeline appends duplicate documents instead of updating in place.
Example
$ uberprompt init
Connected to MongoDB
Created collection: spans
Created index: spans.spanId_1 (unique)
Created index: spans.traceId_1_startTime_1
Created index: traces.traceId_1 (unique)
DonePrerequisites
Set MONGODB_URI in your .env file at the repo root:
MONGODB_URI=mongodb+srv://user:pass@cluster.mongodb.net/uberpromptIf the password contains special characters (like !), URL-encode them (! becomes %21).