Prerequisites
Ensure you have the following tools/items ready.- kubectl
-
Clickhouse database credentials
- Host
- Port
- Username
- If using the bundled version, this is
default
- If using the bundled version, this is
- Password
- If using the bundled version, this is
password
- If using the bundled version, this is
- Database name
- If using the bundled version, this is
default
- If using the bundled version, this is
-
Connectivity to the Clickhouse database from the machine you will be running the
delete_trace_by_idscript on.- If you are using the bundled version, you may need to port forward the clickhouse service to your local machine.
- Run
kubectl port-forward svc/langsmith-clickhouse 8123:8123to port forward the clickhouse service to your local machine.
-
The script to delete a trace
- You can download the script from here
Running the deletion script for a single trace
Run the following command to run the trace deletion script using a single trace ID:Running the deletion script for a multiple traces from a file with one trace ID per line
Run the following command to run the trace deletion script using a list of trace IDs:Troubleshooting
āCould not find trace IDsā error
If you receive an error message stating that trace IDs could not be found, add the--ssl flag to your command. Without this flag, the script may not be able to properly connect to ClickHouse, resulting in false ātrace ID not foundā errors.
Example with SSL flag:
clickhouse-cli and querying for the trace IDs before running the deletion script.