Concepts
Not collected
Every recording lists what it could not record, with the reason, so that a missing event is never read as an event that did not happen.
A count in a recording is a count of what was recorded. Every recording also says what it could not record and why, in not_collected. The summary shows the first note; ormaos show shows all of this run's notes; ormaos show --full also lists every kind of thing that is never recorded, with the reason.
$ ormaos run -- python job.py
sync finished: OK
ormaos: r1 exit 0 in …: 1 Python process, 322 calls, 7 exceptions (6 swallowed), 182 io
ormaos: swallowed 6x validate.SkuFormatError at job.py:57, raised at validate.py:24 [r1:e1]
ormaos: not collected: io: reads of the 1 file opened at fetch.py:26: opened for reading, and no `read` call by Python code was seen on a file of that name: if it was read, that was inside C code (a file that is iterated, `for line in f`, `csv.reader`)
ormaos: saved in .ormaos/r1, next: ormaos exceptions r1:e1 | ormaos tree r1:c1Here the job opened data/orders.csv and no read call by Python code was seen: the file was iterated, which happens inside C code. So the recording does not say how the file was read, and says so.
Notes from the example programs#
A web backend: directory operations, I/O that no line of your code was waiting for, and log records asked for by a library thread:
$ ormaos show
r1 exit 0 in …: 1 Python process, 72 calls, 1 exception (1 swallowed, 0 uncaught)
command: python main.py
code: git commit not read (the working directory is not inside a git repository)
swallowed 1x KeyError at app.py:30 in discount_for, raised at app.py:29 [r1:e1]
io: 111 events (sqlite 110, http 1)
io: 38x sqlite "INSERT INTO order_items VALUES (?, ?, ?)" from store.py:41 [r1:i10]
io: 24x sqlite "SELECT cents FROM products WHERE id = ?" from app.py:41 [r1:i53]
io: 19x sqlite "INSERT INTO orders VALUES (?, ?, ?)" from store.py:36 [r1:i9]
io: 12x sqlite "SELECT product_id, quantity FROM order_items WHERE order_id = ?" from app.py:35 [r1:i52]
io: 4x sqlite "INSERT INTO products VALUES (?, ?, ?)" from store.py:31 [r1:i8]
... 1 more lines of code repeated io: ormaos io r1
logs: 1 logging record (INFO 1), 1 dropped by the level
not collected: io: directory and file-system operations, at store.py:27 (once): a directory was listed, or a file or directory was made, renamed, changed or removed there; these are not recorded
not collected: io with no line of user code (3 events: 3 file): no frame of user code was waiting for them, so they are not recorded
not collected: logs with no line of user code: 1 logging records were asked for with no frame of user code waiting (library threads, the end of the interpreter): they are counted here and not recorded; the first loggers: asyncio
never recorded: values, and 20 more kinds of things (`ormaos show --full` lists them with the reason)
next: ormaos exceptions r1:e1 | ormaos tree r1:c1 | ormaos io r1 | ormaos io r1:i10 | ormaos logs r1A notebook: the environment a block changes, and why calls are not linked to a cell number:
$ ormaos show r1
r1 record() block in …: 1 Python process, 1 call, 1 exception (0 swallowed, 0 uncaught, 1 StopIteration taken by the interpreter)
command: /tmp/ormaos-docs-generate/venv/bin/python ipykernel_launcher
code: git commit not read (the working directory is not inside a git repository)
io: 1 event (file 1)
not collected: the block as it runs without ormaos: its environment is changed: `with ormaos.record():` sets ORMAOS_DIR, ORMAOS_PATH and ORMAOS_IO in os.environ while the block runs (the Python processes started inside find the recording through them); when the block ends, each is put back to the value the program had, or removed if it had none
not collected: which notebook cell a call is in: the kernel gives every cell a temporary file name (.../ipykernel_<pid>/<number>.py); calls and exceptions are recorded under that name, not under the cell's number, and the file is gone when the kernel stops
not collected: io: reads of the 1 file opened at 1887773198.py:10: opened for reading, and no `read` call by Python code was seen on a file of that name: if it was read, that was inside C code (a file that is iterated, `for line in f`, `csv.reader`)
never recorded: values, and 20 more kinds of things (`ormaos show --full` lists them with the reason)
next: ormaos tree r1:c1 | ormaos io r1A choice of capabilities:
$ ormaos show r5
r5 exit 0 in …: 1 Python process, 0 calls, 7 exceptions (6 swallowed, 0 uncaught)
command: python job.py
code: git commit not read (the working directory is not inside a git repository)
recorded only: context, exceptions, io
swallowed 6x validate.SkuFormatError at job.py:57 in sync_orders, raised at validate.py:24 [r5:e1]
io: 182 events (sqlite 181, file 1)
io: 30x sqlite "SELECT on_hand, pack_size FROM stock WHERE sku = ?" from inventory.py:87 [r5:i3]
io: 30x sqlite "SELECT ? FROM applied_orders WHERE order_id = ?" from inventory.py:92 [r5:i4]
io: 30x sqlite BEGIN from inventory.py:101 [r5:i5]
io: 30x sqlite "UPDATE stock SET on_hand = on_hand - ? WHERE sku = ?" from inventory.py:101 [r5:i6]
io: 30x sqlite "INSERT INTO applied_orders (order_id, sku, quantity, applied_at) VALU..." from inventory.py:105 [r5:i7]
... 1 more lines of code repeated io: ormaos io r5
not collected: io: reads of the 1 file opened at fetch.py:26: opened for reading, and no `read` call by Python code was seen on a file of that name: if it was read, that was inside C code (a file that is iterated, `for line in f`, `csv.reader`)
never recorded: values, and 17 more kinds of things (`ormaos show --full` lists them with the reason)
next: ormaos exceptions r5:e1 | ormaos io r5 | ormaos io r5:i3What can be missing#
Each is said in not_collected when it happens, unless noted.
- A Python that the command starts without
ormaosinstalled, without its site packages (-S), or withoutORMAOS_DIRin its environment. - The last events of a process that is killed: at most 256 records, or what arrived in its last 0.2 seconds.
- Calls and exceptions at the recursion limit.
- Reads and writes inside C code: a file that is iterated (
for line in f,csv.reader(f)) or written byprint(..., file=f). - Sockets, directory and file-system operations (
os.listdir,os.mkdir,os.remove, ...),os.read/os.write: each line of your code that does one is listed, with a count. - I/O that no line of your code is waiting for: counted in one line.
- What comes after a limit.
- A logging record made without the functions of a logger (not listed); other databases, and anything a C library does by itself (not listed).
The kinds never recorded#
ormaos show --full ends with every kind of thing that is never recorded, each with its reason:
$ ormaos show r1 --full
r1 exit 0 in …: 1 Python process, 322 calls, 7 exceptions (6 swallowed, 0 uncaught)
header: format provisional-0, ormaos 0.0.1, mode run, started 2026-11-27 12:00:00, platform linux, in .ormaos/r1
working directory: /tmp/ormaos-docs-generate/run/order-sync
environment: 12 variables, names only: HOME LANG NO_COLOR PATH PWD PYTHONDONTWRITEBYTECODE PYTHONHASHSEED SHLVL TERM TZ VIRTUAL_ENV _
the command and what it started: cpu user …, cpu system …, largest memory of a process …
command: python job.py
code: git commit not read (the working directory is not inside a git repository)
process 1: pid …, parent pid …, no recorded parent; Python 3.14.4 at /tmp/ormaos-docs-generate/venv/bin/python; recorded: context, calls, exceptions, io, logs, dataframes, tensors; 322 calls, 7 exceptions, 1 thread, 0 tasks; ran …; cpu user …; cpu system …; largest memory …
started as: mode script, target job.py, argc 2
swallowed 6x validate.SkuFormatError at job.py:57 in sync_orders, raised at validate.py:24 [r1:e1]
io: 182 events (sqlite 181, file 1)
io: 30x sqlite "SELECT on_hand, pack_size FROM stock WHERE sku = ?" from inventory.py:87 [r1:i3]
io: 30x sqlite "SELECT ? FROM applied_orders WHERE order_id = ?" from inventory.py:92 [r1:i4]
io: 30x sqlite BEGIN from inventory.py:101 [r1:i5]
io: 30x sqlite "UPDATE stock SET on_hand = on_hand - ? WHERE sku = ?" from inventory.py:101 [r1:i6]
io: 30x sqlite "INSERT INTO applied_orders (order_id, sku, quantity, applied_at) VALU..." from inventory.py:105 [r1:i7]
... 1 more lines of code repeated io: ormaos io r1
logs: 8 logging records (WARNING 6, INFO 2), 8 dropped by the level
not collected: io: reads of the 1 file opened at fetch.py:26: opened for reading, and no `read` call by Python code was seen on a file of that name: if it was read, that was inside C code (a file that is iterated, `for line in f`, `csv.reader`)
never recorded: values: by design: only type, length and structure are recorded (values are recorded only in a recording made with `ormaos run --values`)
never recorded: calls outside user code: the standard library and installed packages are not recorded
never recorded: code compiled from a string under another name: code made with `compile` or `exec` is the program's when its file name is `<string>`, `<stdin>` or a notebook cell; under any other made-up name it is not recorded
never recorded: code of the program that runs in the middle of the recorder: a signal handler, a `__del__` or a weak reference callback that Python runs while Ormaos is noting an event is not recorded (Python reports no events then)
never recorded: exceptions that never pass through user code: only exceptions seen in a user-code frame are recorded
never recorded: which `except*` clause matched: for `except*` the handler line is the first clause of the `try`; several clauses can each take a part of the group, and which ones did is not recorded (the place is listed when it happens)
never recorded: io: contents: by design: no SQL parameters or literals, no file contents, no request or response bodies, no headers, no URL query strings
never recorded: io: results: rows returned or changed, bytes read or written and the exit status of a subprocess are not recorded
never recorded: io: reads and writes of a file that are not a method call: a read or a write is seen when Python code calls `read` or `write` on the file; iterating a file (`for line in f`, `csv.reader`) or `print(..., file=f)` happens inside C code, and only the `open` is seen (the files opened and never seen read or written are listed when it happens)
never recorded: io: sqlite3 statements, after the program sets a trace callback: sqlite3 has no event for statements, so Ormaos sets the trace callback of each connection. A callback the program had already set is kept and still called. When the program sets or clears the callback later, its choice stays and the statements after that are not recorded: this is reported for the connection when the call is made by Python code, and not when it is made from inside C code (`operator.methodcaller`, an extension module)
never recorded: io: other kinds: only sqlite3, files (`open`, `read`, `write`), subprocesses and HTTP through http.client (urllib, requests, urllib3) or httpx are recorded; not sockets, directory operations or `os.read` (listed with the line when they happen), and not other databases or anything a C library does by itself (never seen)
never recorded: io: the outcome of an `open` made from inside C code: an `open` is recorded when it is asked for; when it fails it is marked `raised` if Python code called it, and not otherwise
never recorded: io with no line of user code: I/O that no frame of user code is waiting for is not recorded: the import system and interpreter start (never counted), library threads and interpreter exit (counted when it happens)
never recorded: logs: the arguments and the formatted message: by design: of a logging record, the level, the logger, the line of your code and the message template are recorded, and how many arguments it had. A message that is not a string written in the code of the caller (an f-string, a text put together at run time) is a value: only its type and length are recorded
never recorded: logs: what happened to a record after the logger let it through: `dropped` means the level of the logger (or `logging.disable`) stopped the record before it was made. Whether a filter or the level of a handler stopped it later, and where it was written, is not recorded
never recorded: logs: records that do not go through `logging`: only the standard `logging` module is seen: not `print`, not `warnings`, not another logging library unless it hands its records to `logging`; a record with no line of your code waiting for it (a library thread) is counted, not recorded; what a library logs while it is being imported is not recorded
never recorded: dataframes: the cells: by design: of a pandas DataFrame or Series that a call receives or returns, only the number of rows and columns, the names and dtypes of the columns and the nulls per column are recorded. A column label that is text is recorded as a name (in a frame whose labels come from the data, a pivot, those labels are in the recording); a label that is not text is recorded by its type
never recorded: dataframes: frames that are not an argument or a result: a frame is described where a call of your code receives or returns it; not a frame inside a list or a dict, not a local variable, not a subclass of DataFrame or Series, and nothing when the program did not import pandas
never recorded: tensors: the numbers: by design: of a numpy array or a torch tensor that a call receives or returns, only the shape, the dtype, the device and the numeric health are recorded: how many NaN, how many inf, the smallest and the largest number (those two are numbers of the data)
never recorded: tensors: numeric health of some arrays: health is computed for float and integer dtypes, on the CPU, up to a size limit (listed when one is over it); not for bool, complex, object or text dtypes, sparse or quantized tensors, subclasses, arrays inside a list or a dict, and nothing when the program imported neither numpy nor torch
never recorded: path: line-by-line recording is off; ask for a scope with `ormaos run --path <file.py:function>`
next: ormaos exceptions r1:e1 | ormaos tree r1:c1 | ormaos io r1 | ormaos io r1:i3 | ormaos logs r1