> For the complete documentation index, see [llms.txt](https://docs.clickai.vn/clickai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clickai.vn/clickai-docs/clickai-docs-en/developer/monitor-and-performance.md).

# Monitor & Performance

<figure><img src="/files/pfuEdcg2ZI692NZYKtjt" alt=""><figcaption></figcaption></figure>

## Table of Contents

·       \[Overview]\(#overview)

·       \[Dashboard]\(#dashboard)

·       \[Logs]\(#logs)

·       \[Annotation System]\(#annotation-system)

·       \[Integrations]\(#integrations)

&#x20;

## Overview

ClickAI provides a comprehensive monitoring toolkit to help you:

·       📈 Track performance of applications in real-time

·       💰 Control costs of token and model usage

·       🐛 Debug conversation issues

·       ⭐ Collect feedback from users

·       ✏️ Improve quality of AI responses through annotations

&#x20;

## Dashboard

The Dashboard provides an overview of application performance through key metrics:

### Key Metrics

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Metric</td><td valign="top">Description</td><td valign="top">Purpose</td></tr><tr><td valign="top">Total Messages</td><td valign="top">Total number of messages</td><td valign="top">App usage level</td></tr><tr><td valign="top">Active Users</td><td valign="top">Number of active users</td><td valign="top">User base size</td></tr><tr><td valign="top">Avg Response Time</td><td valign="top">Average response time</td><td valign="top">System performance</td></tr><tr><td valign="top">Token Usage</td><td valign="top">Tokens consumed</td><td valign="top">Operating costs</td></tr><tr><td valign="top">Token Cost</td><td valign="top">Token cost in currency</td><td valign="top">Budget &#x26; ROI</td></tr><tr><td valign="top">User Satisfaction</td><td valign="top">Satisfaction rate (👍/👎)</td><td valign="top">Response quality</td></tr></tbody></table>

&#x20;

### Time Filters

View data across different time periods:

·       Last 24 hours — Real-time monitoring

·       Last 7 days — Weekly trends

·       Last 30 days — Monthly analysis

·       Custom range — Custom time period

### Visual Charts

·       Line Chart: Message and user trends over time

·       Bar Chart: Daily token usage

·       Pie Chart: Satisfaction rating distribution (Positive/Neutral/Negative)

💡 TIP: Monitor \*\*Token Cost\*\* regularly to optimize spending. If costs spike suddenly, check for looping workflows or overly long prompts.

&#x20;

## Logs

Logs allow you to view detailed conversations, debug issues, and collect feedback.

### What Gets Logged

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Log Type</td><td valign="top">Details</td></tr><tr><td valign="top">Conversation Timeline</td><td valign="top">Chronological list of user interactions</td></tr><tr><td valign="top">Message Details</td><td valign="top">Full conversation context with AI responses</td></tr><tr><td valign="top">Performance Data</td><td valign="top">Response times and token usage per interaction</td></tr><tr><td valign="top">User Feedback</td><td valign="top">Ratings and comments from users and team members</td></tr></tbody></table>

&#x20;

### Using the Logs Console

Access: Open your app → "Logs" tab

In the Logs Console, you can:

1\.     View timeline — Browse the list of conversations

2\.     Message details — Click a conversation to see full content

3\.     Performance data — Response time, tokens used

4\.     Feedback — View 👍/👎 ratings and comments

### Debugging with Logs

When your AI app responds incorrectly:

5\.     Find the conversation with issues in Logs

6\.     View details — Check prompt, context, and response

7\.     Analyze — Identify root cause (unclear prompt, missing context, ...)

8\.     Improve — Adjust prompt or add knowledge

### Feedback Collection

ClickAI supports collecting 2 types of feedback:

·       End-user feedback: Users rate 👍/👎 on the Web App interface

·       Team feedback: Team members rate and annotate directly in Logs

### Log Retention

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Plan</td><td valign="top">Retention Period</td></tr><tr><td valign="top">Sandbox</td><td valign="top">30 days</td></tr><tr><td valign="top">Professional &#x26; Team</td><td valign="top">Unlimited (during active subscription)</td></tr><tr><td valign="top">Self-hosted</td><td valign="top">Unlimited (default), configurable</td></tr></tbody></table>

&#x20;

Configure log retention (Self-hosted):

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Environment Variable</td><td valign="top">Description</td></tr><tr><td valign="top">WORKFLOW_LOG_CLEANUP_ENABLED</td><td valign="top">Enable/disable auto log cleanup</td></tr><tr><td valign="top">WORKFLOW_LOG_RETENTION_DAYS</td><td valign="top">Number of days to retain logs</td></tr><tr><td valign="top">WORKFLOW_LOG_CLEANUP_BATCH_SIZE</td><td valign="top">Number of logs deleted per batch</td></tr></tbody></table>

&#x20;

### Privacy Considerations

🛑 CAUTION: Logs contain user conversation content. Ensure compliance with data security regulations: restrict Logs access to necessary personnel only, do not share log data outside the organization, comply with PDPA/GDPR if serving international users.

&#x20;

## Annotation System

Build a curated library of high-quality responses to improve consistency and bypass AI generation.

### When to Use Annotations

·       📌 Frequently asked questions needing precise standard answers

·       🔒 Sensitive information requiring strict control

·       ⚡ Want faster responses (no LLM call needed)

·       🎯 Ensure consistency for critical answers

### How Annotations Work

9\.     User asks a question

10\.  System searches existing annotations for semantic matches

11\.  If a match above the similarity threshold is found, returns the curated response

12\.  If no match, proceeds with normal AI generation

13\.  Track which annotations get used and how often

### Setting Up Annotations

14\.  Go to your app → Logs & Annotations → "Annotations" tab

15\.  Enable Annotation Reply in settings

16\.  Select Embedding Model for semantic matching

17\.  Configure Similarity Threshold (recommended: 0.7 - 0.9)

### Creating Annotations

Method 1: From existing conversations

18\.  In Debug & Preview or Logs, find a good AI response

19\.  Click the "Add Annotation" icon on the response

20\.  Edit the answer if needed → Save

Method 2: Manual creation

21\.  Go to the Annotations tab

22\.  Click "+ Add"

23\.  Enter sample question and standard answer

24\.  Save the annotation

Method 3: Bulk import

25\.  In the Annotations tab, click "..." → "Bulk Import"

26\.  Upload a CSV file with format: question, answer

27\.  Review and confirm

### Managing Annotation Quality

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Action</td><td valign="top">Purpose</td></tr><tr><td valign="top">Review hit history</td><td valign="top">See which annotations are being used</td></tr><tr><td valign="top">Edit annotations</td><td valign="top">Update answers when information changes</td></tr><tr><td valign="top">Delete unused</td><td valign="top">Remove outdated annotations</td></tr><tr><td valign="top">Bulk export</td><td valign="top">Backup your annotation library</td></tr></tbody></table>

&#x20;

<figure><img src="/files/VVVVKohppgehrmBGCyY0" alt=""><figcaption></figcaption></figure>

## Integrations

ClickAI supports integration with external observability platforms:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Platform</td><td valign="top">Description</td></tr><tr><td valign="top">LangSmith</td><td valign="top">Tracing and debugging LLM applications</td></tr><tr><td valign="top">LangFuse</td><td valign="top">Open-source LLM observability</td></tr><tr><td valign="top">Alibaba Cloud</td><td valign="top">Alibaba Cloud monitoring integration</td></tr></tbody></table>

&#x20;

📝 NOTE: Third-party integrations allow you to track LLM calls, latency, and token usage in greater detail than the default Dashboard.

&#x20;

*📖 Previous: \[Publish]\(./02-publish-en.md) · Next: \[Knowledge]*


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clickai.vn/clickai-docs/clickai-docs-en/developer/monitor-and-performance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
