Monitoring & Tracing DSPy with Langtrace
Karthik Kalyanaraman
⸱
Cofounder and CTO
Jun 18, 2024
Introduction
We are excited to announce that Langtrace now supports DSPy, a framework for algorithmically optimizing LM prompts and weights, especially when LMs are used one or more times within a pipeline. This integration expands Langtrace’s capabilities, allowing for automatic tracing of DSPy out of the box allowing the developer to get high cardinal tracing with deeper insights into how DSPy optimizes modules and pipelines.
What is Langtrace?
Langtrace is an open-source observability tool designed to collect and analyze traces to help you improve your LLM (Large Language Model) applications. Langtrace has two main components:
SDK: A lightweight library that can be installed in your project to collect traces. These traces are OpenTelemetry-based and can be exported to Langtrace or any other observability stack.
Langtrace Client: A web-based interface for viewing and analyzing your traces.
Key Benefits of DSPy Support in Langtrace.
Advanced Tracing & Logging: View high cardinal and detailed visual representations of traces and logs extracted from your DSPy modules and sent directly to Langtrace.
Seamless Integration: Enjoy a quick and non intrusive integration with just 2 lines of code.
Open-Source Compatibility: Continue to benefit from open-source tools that prevent vendor lock-in, aligning with Langtrace’s commitment to open-source principles.
Getting Started with Langtrace and DSPy
To begin using DSPy with Langtrace, follow these steps:
Sign Up and Generate an API Key: Sign up for Langtrace and generate an API key from the Langtrace dashboard.
Install the SDK: Install the Langtrace SDK using pip for Python.
Initialize the SDK: Initialize the SDK in your project with the generated API key.
Run Your Application: Start your application and view your traces on the Langtrace dashboard.
For detailed instructions and more information, visit our documentation.
Conclusion
The integration of DSPy support into Langtrace significantly enhances our platform, providing powerful tools for DSPy module tracing and logging. We are eager to see how our community leverages these new capabilities to improve the observability and evaluation of LLM-based applications.
Stay tuned for more updates and features. For any questions or support, please visit our documentation or reach out to our support team.
Happy tracing!
Ready to deploy?
Try out the Langtrace SDK with just 2 lines of code.
Want to learn more?
Check out our documentation to learn more about how langtrace works
Join the Community
Check out our Discord community to ask questions and meet customers