How to delete Traces

After using Kolo for a while you may have many old traces you don’t want to keep. There are two ways to delete them:

How to delete traces in VSCode

You can right click a trace in the Kolo sidebar and select the “Delete trace” option.

If you want to delete multiple traces you can select them all and then use the “Delete trace” option.

How to delete traces at the command line

You can delete one or more traces by passing their trace_id to kolo trace delete:

$ kolo trace delete trc_01G79WVAJ00312A14VSYZ89T25 trc_01G79WVAJ0086PBXVCMH0S8B4C

You can delete all traces older than 30 days by running:

$ kolo trace delete --old
Deleted 2702 old traces created before 2023-02-11 16:27:48.458975.

You can provide a date (or datetime) to the --before option and Kolo will delete all traces older than that time:

$ kolo trace delete --old --before 2023-03-01
Deleted 12 old traces created before 2023-03-01 00:00:00.

How to recover disk space from the Kolo database

The Kolo database can grow very large. You can run:

$ kolo trace delete --vacuum

This will compact the Kolo database to recover lost disk space from deleted data. This is slow, so it is not enabled by default.