Exporting Traces from LangSmith
We provide a Python script that exports LangSmith traces to a CSV file compatible with Datawizz. The script extracts comprehensive metadata from your LLM calls including messages, tokens, costs, and latency information.Prerequisites
You’ll need a LangSmith API key. You can get one from: https://smith.langchain.com/settings Set your API key as an environment variable:Running the Export Script
You can run the script using Python directly or withuv:
Output Format
The script creates alangsmith_traces.csv file with 21 columns per LLM call:
The
input_messages column uses OpenAI message format, making it directly compatible with Datawizz dataset imports.
Importing into Datawizz
Once you have your exported CSV file:- Navigate to the Datasets tab in the Datawizz dashboard
- Create a new dataset or open an existing one
- Click Import CSV and select your
langsmith_traces.csvfile - Map the
input_messagescolumn toinputandoutput_messagetooutput