Observability

LangSmith
A developer tool/platform for managing and debugging LLM (Large Language Model) applications.
Helps with tracing, monitoring, and evaluation of prompts and responses.
LangFuse
An open-source observability and analytics platform for LLM applications.
Provides monitoring, logging, and user feedback integration.
Key Difference Example:
LangSmith → Often used for prompt debugging and evaluation.
LangFuse → Often used for observability and logging across the lifecycle.
Implementation Notes
LangSmith Environment Setup
Add the following to .env file:
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT=https://api.smith.langchain.com
LANGSMITH_API_KEY=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
LANGSMITH_PROJECT=calender-ai-project
Installation Command
Run:
npm install @langchain/langgraph @langchain/core
LangFuse Setup
Self-Hosting with Docker Compose
Official deployment guide: LangFuse Docker Compose Deployment
Provides steps to set up LangFuse locally or on a server using Docker Compose.
Integration with LangChain
Official integration guide: LangFuse x LangChain
Explains how to integrate LangFuse observability directly into LangChain apps.
Comparison
| Feature | LangSmith | LangFuse |
| Setup | Easy, quick | Harder (needs Docker, DB setup) |
| Cost | Costly | Nearly free (self-hosted option) |
| Purpose | Debugging, tracing, evaluation | Monitoring, observability, logging |
| Flexibility | Limited by platform pricing model | Fully open-source, customizable |