Skip to Content

Tracking Usage

Liona provides comprehensive usage tracking that helps you monitor spending, analyze patterns, and understand how your users interact with AI providers. This information is crucial for budget management, optimizing performance, and identifying opportunities for improvement.

Project-Level Usage Analytics

The dashboard provides an overview of usage across your entire project:

Viewing Project Dashboard

  1. Navigate to your project’s main dashboard page
  2. View the usage charts and metrics for all users in the project

Project dashboard

Available Analytics

The project dashboard shows:

  • Model Usage: Visual breakdown of usage by different AI models
  • Monthly Spend: Total spending on AI providers for the current month
  • Execution Count: Number of API calls made to AI providers
  • Usage Trends: Charts showing usage patterns over time

These high-level metrics help you understand the overall health and activity of your project.

User-Level Usage Tracking

For more granular analytics, Liona provides detailed usage tracking for individual users:

Viewing User Usage

  1. Navigate to “Users” in the sidebar
  2. Click on a specific user
  3. Scroll to the “User Activity” section

User usage section

Available User Analytics

For each user, you can see:

  • Recent Executions: List of recent API calls made by the user
  • Models Used: Which AI models the user is accessing
  • Spending Patterns: How much the user is spending over time
  • Request Details: Information about specific API calls (when Request Tracing is enabled)

This detailed view helps you understand how individual users are interacting with your AI providers.

Detailed Execution Logs

Liona tracks every execution (API call) made to your AI providers. To view detailed logs:

  1. Navigate to “Usage” in the sidebar

  2. Browse the list of executions, which includes:

    • Provider and model information
    • Execution timestamp
    • Status code
    • Cost
    • User information
  3. Click on any execution to view more details:

    • Request URL
    • Response status
    • IP information (with geolocation when available)
    • Resource usage

Execution details

💡
Tip

You can use the execution logs to troubleshoot issues, verify proper usage, and understand patterns in your AI provider interactions.

Enhanced Tracking with Request Tracing

For users on the Pro plan, Request Tracing provides even more detailed insights:

  • Complete request and response bodies
  • Prompt and response content
  • Detailed token usage information
  • Request timing data

This enhanced tracking is invaluable for debugging, auditing, and building training datasets.

Usage Alerts and Notifications

Liona enforces the spending limits you’ve set in your policies:

  • When a user reaches their spending limit, further requests will be rejected
  • Users will receive appropriate error messages explaining the limit has been reached
Note

Currently, email notifications for approaching limits are in development. Check the roadmap for updates on this feature.

Exporting Usage Data

To extract usage data for further analysis:

  1. Navigate to “Usage” in the sidebar
  2. Use the browser’s built-in functionality to save the page or take screenshots
  3. For more detailed exports, use the API to programmatically retrieve usage data

Optimizing Based on Usage Data

Usage data can help you optimize your AI implementation:

  1. Identify Heavy Users: See which users or systems are consuming the most resources
  2. Adjust Policies: Modify spending limits based on actual usage patterns
  3. Balance Providers: Distribute load across providers to optimize performance and cost
  4. Enable Caching: For frequently repeated queries, consider enabling Request Caching

Next Steps

With usage tracking insights:

  1. Optimize policies based on actual usage
  2. Enable Request Tracing for more detailed analytics
  3. Consider Request Caching to improve performance and reduce costs
Last updated on