Skip to main content
CID222 Docs

Tenant analytics

Tokens, cost, sessions, detections and regulation exposure for one account over a period, with period-over-period comparison and a PDF export.

  • Version: 0.4
  • Role: admin_user, viewer
  • Type: task

Tenant Analytics answers one question about one account: over this period, how much did they use, what did it cost, what did the filters catch, and which regulations does that touch. Every figure carries a comparison against the immediately preceding period of the same length.

What do I need?

Licence
Any
Role
admin_userviewer

Prerequisites

  • The account you want to look at exists and has used the gateway's chat path.
  • You are signed in as an admin_user, the superadmin, or a viewer. A normal_user is refused.
  • The account is inside your scope: an admin_user reads itself and the members of groups it owns; a request for anyone else is refused with 403.

This page reads the chat pipeline's own tables — sessions, content detections and the model catalogue. It is per-account by construction: there is no fleet-wide view here, and nothing loads until you pick somebody.

Pick an account and a period

Open the page

Select Administration → Tenant Analytics.

The page opens on Select a tenant to view analyticsUse the dropdown above to choose a tenant. Nothing is requested until you do.

Choose the account

Open Select a tenant… and pick one, typing into Search tenants… to narrow the list.

The figures load, and the note to the right of the toolbar reads Showing data for {name} · {start}{end}.

Set the period

Select 7d, 30d, 90d or All time, or set Start date and End date yourself.

Setting either date switches the segmented control to a custom range. Read the note beside the toolbar afterwards: it states the window the figures actually cover.

Refresh when you need the current answer

Select Refresh.

The page does not poll. What you are looking at is the answer as of the last fetch.

Danger

All time does not mean all time. It clears both dates, and the gateway then applies its own default of the last 30 days — so All time and 30d return the same figures. To cover a longer history, set Start date yourself. The note beside the toolbar always states the window the gateway resolved, and it is the figure to trust.

The account picker loads only the first 100 accounts. On an appliance with more than that, an account beyond the first page cannot be selected from this screen; call /admin/tenant-analytics/stats with its tenant_id instead.

Read the figures

TileWhat it showsComparison
Total tokensPrompt plus completion tokens in the period, with the average per sessionAgainst the preceding period; up is neutral
Estimated costPriced from the model catalogueAgainst the preceding period
SessionsSessions active in the period, with the all-time total underneathAgainst the preceding period
DetectionsContent detections in the period, with the majority entity typeAgainst the preceding period, where down is the good direction
Regulations violatedDistinct regulations the detections touch, with the top three namedAgainst the preceding period

Below the tiles, Model usage breaks the tokens down per model with its provider, share and session count; Detections splits them by action and by entity type; and the trend chart plots tokens, cost, sessions and detections per day.

Selecting the Regulations violated tile opens the regulation breakdown: per regulation, the violation count, the entity types behind it, the articles it maps to with their severity, and an estimated fine range.

Warning

The fine figures are an estimate derived from the regulation catalogue, not a legal assessment and not a number any regulator has issued. Treat them as a way to rank exposure between regulations, never as a forecast.

Note

A comparison reads — no change when the metric did not move or the preceding period holds no data to compare against. It is not an error.

Export the report

Take the PDF

Select Download PDF.

The gateway re-fetches the same data under your own scope and renders it through the report renderer. A PDF downloaded toast confirms it; the file is named for the account and today's date.

Or take the standalone HTML

Select Export HTML.

This writes a self-contained HTML file in the browser from the data already on screen — summary, model usage, daily trends and the regulation table. It is built client-side, so it carries no letterhead and no scope block; the PDF is the report to hand to somebody else.

Fields reference

Toolbar

ControlWhat it does
Select a tenant…Chooses the account. Required — nothing loads without it. First 100 accounts only
7d / 30d / 90d / All timeSets the period. All time clears both dates
Start date / End dateAn explicit range; either one switches the preset to custom
RefreshRe-fetches. The page does not poll
Export HTMLA client-side HTML file of what is on screen
Download PDFThe server-rendered, letterheaded report

What the response carries

BlockContents
tenantName, contact email, role, active flag, creation date
periodThe resolved start and end dates — what the figures actually cover
token_usageTotal tokens and cost, each with its comparison
model_breakdownPer model: display name, provider, tokens, cost, share, session count
detection_statsTotal, split by action and by entity type, plus the majority type
session_statsSessions in the period, all-time total, average tokens per session
daily_trendsPer day: tokens, cost, sessions, detections
regulation_statsPer regulation: violations, entity types, articles with severity, fine estimate

Verify

  1. Pick an account you have just chatted as. Total tokens and Sessions are non-zero, and the note names the account and the resolved period.
  2. Switch from 30d to 7d. The figures fall or stay level, and the note's date range moves.
  3. Cross-check Total tokens against the same account's row on Token cost and savings over the same window. The two read the same traffic from different tables; a large disagreement means one of them is seeing sessions the other is not.
  4. This page writes no event log rows. Reading an account's analytics is not audited.

If it fails

  • Failed to load analytics with Out of scope for this tenant — a 403. An admin_user may read only itself and the members of the groups it owns. The refusal happens before any data is read.
  • Failed to load analytics with Tenant with ID … not found — a 404. The account was deleted, or the id is wrong.
  • A 400 naming tenant_id — the query reached the gateway without a valid account id. From the dashboard this cannot happen; from a direct call, tenant_id is required and must be a UUID.
  • Select a tenant to view analytics never goes away — the account list failed to load. Check that you can open Tenant management.
  • PDF export failed: … — the report renderer is down or timed out. Export HTML still works, since it is built in the browser.
  • Costs read zero while tokens are counted — the models used have no price in the catalogue. See Models.
  • Regulations violated reads zero on an account with detections — the entity types detected map to no regulation in the catalogue. See Compliance.

Next steps

  • Token cost and savings — the same spend across every account, with the optimization levers broken out.
  • Compliance — the regulation catalogue behind the fine estimates, and the detections that drive them.
  • All detections — the individual detections behind the counts.

Last updated on

On this page

Download PDF