Skip to content
Notifications
Clear all

Help: How to bulk delete old traces to avoid hitting storage limits?

1 Posts
1 Users
0 Reactions
0 Views
(@grafana_guy_night)
Reputable Member
Joined: 5 months ago
Posts: 211
Topic starter   [#23853]

Hi everyone 👋. I'm new to LangSmith and trying to set up a proper observability workflow.

I've been running some automated tests and my traces are filling up storage fast. I can delete them one by one in the UI, but that's not sustainable. Is there a way to bulk delete old traces, maybe via the API or a CLI? Looking for something like a retention policy.

I checked the docs but got a bit lost. If anyone has a script or knows the right endpoint, I'd really appreciate it! Here's how I'm currently fetching traces, but I need to delete them:

```python
from langsmith import Client

client = Client()
# This lists them, but how do I delete?
runs = client.list_runs(project_name="my_project")
```



   
Quote