Insights¶
The Insights page in the AI Workspace links to your Moesif analytics workspace, where you can view traffic, token usage, latency, and consumer behavior for the requests flowing through your AI Gateways. Moesif is an AI-native API analytics platform.
The AI Workspace does not embed or proxy Moesif content. The Insights page provides a button that opens your Moesif workspace in a new tab, and all analytics are viewed in Moesif itself.
How It Works¶
- Configure your AI Gateway with a Moesif Application ID (see Enabling Moesif on a Gateway). The gateway runtime publishes telemetry — requests, tokens, latency, and guardrail events — directly to Moesif.
- Open Insights in the AI Workspace left navigation menu, then click the button to open your Moesif workspace in a new tab.
- View analytics in Moesif. All data resides in Moesif, not in the AI Workspace.
Enabling Moesif on a Gateway¶
Analytics are published to Moesif only when your gateway runtime is configured with a Moesif Application ID. Set the MOESIF_KEY environment variable on the gateway runtime.
When you set up the gateway, add the key to the configs/keys.env file created during configuration:
Once the key is set and the gateway is running, the gateway publishes events to Moesif automatically. No changes to the AI Workspace are required.
For the full gateway setup procedure, see Setting up an AI Gateway.
Note
If MOESIF_KEY is not configured, the gateway does not publish telemetry and your Moesif workspace will not show any data.
What Moesif Tracks¶
With the gateway Moesif integration active, your Moesif workspace shows:
- Request and response traffic — Volume, latency, and error rates.
- Token usage — Prompt, completion, and total tokens by model and provider.
- Estimated LLM cost — Cost estimates based on token consumption.
- Guardrail policy triggers — How often guardrails intervene.
- Per-application and per-consumer breakdowns — Usage for mapped GenAI Applications and consumers.
Filtering, segmentation, and dashboarding are done entirely within Moesif.
Using Insights for Cost and Rate Limit Management¶
Moesif analytics are useful for tuning your token-based rate limits:
- Use token usage trends to understand actual consumption patterns before setting rate limits.
- Check per-consumer traffic to determine appropriate per-consumer limits.
- Monitor error rates to detect rate limit violations (
429 Too Many Requestsresponses) and adjust limits accordingly.
Using Insights for Guardrail Monitoring¶
When guardrails are active, you can use Moesif analytics to:
- Track how often guardrails intervene (guardrail intervention responses appear as
422errors). - Identify which endpoints or consumers trigger the most interventions.
- Validate that newly configured guardrails behave as expected.
See Guardrails Overview for more on configuring guardrails.
Related¶
- Setting up an AI Gateway — Configure
MOESIF_KEYon the gateway runtime - Token-Based Rate Limiting — Set token limits and use analytics to monitor usage
- Guardrails Overview — Monitor guardrail interventions through analytics
- Integrate API Platform with Moesif — Advanced Moesif integration options for the broader API Platform