Prerequisites
Create a Langfuse project
Create a Langfuse project either:
- Cloud: Sign up at cloud.langfuse.com
- Self-hosted: Follow the Langfuse deployment guide
Configuration
Set the following environment variables for the Rails app:What Gets Tracked
Langfuse automatically tracks the following LLM operations:chat_response- AI assistant chat interactionsauto_categorize- Transaction categorizationauto_detect_merchants- Merchant name detection
- Prompt content
- Model used
- Response text
- Token usage (when available)
- Latency and timing
Viewing Traces
After starting the app with the variables set, visit your Langfuse dashboard to see traces and generations grouped under theopenai.* traces.
All traces are automatically organized by operation type, making it easy to analyze performance and costs for different AI features.
Privacy Considerations
What’s sent to Langfuse:- Prompts and responses
- Model names
- Token counts
- Timestamps
- Session IDs
- Hashed user IDs (not actual user data)
- User email addresses
- User names
- Unhashed user IDs
- Account credentials