curl to send trace data. This guide will walk you through how to integrate LangWatch with any system that allows HTTP requests.
Protip: wanna to get started even faster? Copy our llms.txt and ask an AI to do this integration
- Ensure you have
curlinstalled on your system.
LANGWATCH_API_KEY environment variable in your environment:
- Prepare your JSON data. Make sure it’s properly formatted as expected by LangWatch.
- Use the curl command to send your trace data. Here is a basic template:
@- tells curl to read the JSON data from the standard input, which we provide via the EOF-delimited here-document.
For the type reference of how a span should look like, check out our types definitions.
It’s optional but highly recommended to pass the user_id on the metadata if you want to leverage user-specific analytics and the thread_id to group related traces together. To connect it to an event later on. Read more about those and other concepts here.
- Execute the
curlcommand. If successful, LangWatch will process your trace data.
curl command to handle these cases.
After following the above guide, your interactions with LLMs should now be captured by LangWatch. Once integrated, you can visit your LangWatch dashboard to view and analyze the traces collected from your applications.