mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
* Refine docs based on internal feedback * update the zh and ja docs --------- Co-authored-by: Riskey <riskey47@dify.ai>
83 lines
3.3 KiB
Plaintext
83 lines
3.3 KiB
Plaintext
---
|
|
title: "Logs"
|
|
description: "Monitor real-time conversations, debug issues, and collect user feedback"
|
|
icon: "memo"
|
|
---
|
|
|
|
Conversation logs provide detailed visibility into every interaction with your AI application. Use them to debug specific issues, understand user behavior patterns, and collect feedback for continuous improvement.
|
|
|
|
## What Gets Logged
|
|
|
|
**All User Interactions**
|
|
Every conversation through your web app or API is logged with complete input/output history, timing data, and system metadata.
|
|
|
|
**User Feedback**
|
|
Thumbs up/down ratings and user comments are captured alongside the conversations they reference.
|
|
|
|
**System Context**
|
|
Model used, token consumption, response times, and any errors or warnings during processing.
|
|
|
|
**Exclusions:** Debugging sessions and prompt testing are not included in logs.
|
|
|
|
## Using the Logs Console
|
|
|
|
Access logs from your application's navigation menu. The interface shows:
|
|
|
|
- **Conversation Timeline:** Chronological list of user interactions
|
|
- **Message Details:** Full conversation context with AI responses
|
|
- **Performance Data:** Response times and token usage per interaction
|
|
- **User Feedback:** Ratings and comments from users and team members
|
|
|
|
## Debugging with Logs
|
|
|
|
**Failed Interactions**
|
|
Quickly identify conversations where the AI provided poor responses, failed to understand user intent, or encountered errors.
|
|
|
|
**Performance Issues**
|
|
Spot slow responses, high token usage, or system errors that affect user experience.
|
|
|
|
**User Journey Analysis**
|
|
Follow individual users through multiple conversations to understand usage patterns and pain points.
|
|
|
|
## Feedback Collection
|
|
|
|
**User Ratings**
|
|
Users can provide thumbs up/down feedback on AI responses. Track satisfaction trends over time.
|
|
|
|
**Team Annotations**
|
|
Team members can add internal notes and improved responses directly in the log interface.
|
|
|
|
**Feedback Analysis**
|
|
Identify common complaint patterns, successful interaction types, and areas needing improvement.
|
|
|
|
## Log Retention
|
|
|
|
<Warning>
|
|
Ensure your application complies with local data privacy regulations. Publish a privacy policy and obtain user consent where required.
|
|
</Warning>
|
|
|
|
- **Sandbox**: Logs are retained for 30 days.
|
|
|
|
- **Professional & Team**: Unlimited log retention during active subscription.
|
|
|
|
- **Self-hosted**: Unlimited by default; configurable via environment variables `WORKFLOW_LOG_CLEANUP_ENABLED`, `WORKFLOW_LOG_RETENTION_DAYS`, and `WORKFLOW_LOG_CLEANUP_BATCH_SIZE`.
|
|
|
|
## Improving Applications with Logs
|
|
|
|
**Pattern Recognition**
|
|
Look for recurring user questions that your application handles poorly. These indicate opportunities for prompt improvements or knowledge base updates.
|
|
|
|
**Response Quality**
|
|
Use feedback patterns to identify which types of responses work well and which need refinement.
|
|
|
|
**Performance Optimization**
|
|
Track response times and token usage to identify inefficient prompts or model configurations.
|
|
|
|
**Content Gaps**
|
|
Spot topics or question types where your application consistently struggles, indicating areas for knowledge base expansion.
|
|
|
|
## Privacy Considerations
|
|
|
|
Logs contain complete user conversations and may include sensitive information. Implement appropriate access controls and ensure compliance with applicable data protection regulations.
|
|
|
|
Consider configuring shorter retention periods for applications handling sensitive data or implement log anonymization where appropriate. |