Analytics
Volume, errors, latency, tokens and cost over time, broken down by built-in fields or your own custom dimensions, plus heatmaps and attribute diffs.
Analytics aggregates the events you send into the numbers you watch: how much traffic, how many errors, how slow, how many tokens, how much it cost. Every read takes the same filters, so you can slice any number by model, service, environment or any attribute your app stamps on its spans.
Analytics counts events (spans, logs and custom events), not traces. The timeseries also reports a distinct trace count per bucket.
In the dashboard
Open Analytics in the sidebar.
- The tiles at the top show Volume, Success, Avg latency, Errors, Tokens and Known cost for the window, each with a trend.
- Activity over time, Errors over time, Latency distribution and Models in production chart the same window.
- Group by ranks the top values of a field: Service, Operation, Status, Error type, Agent, Tool, User, App, Model, Provider, or a Custom attribute discovered from your spans. Pick a value to see its Trend and Latency.
- Latency heatmap plots request duration against time. Drag a region, or toggle errors only, and What explains this slice ranks the attributes that are over-represented in your selection compared with the whole window.
- Metrics charts counters, gauges and distributions sent from Sentry SDKs. See Metrics.
The time picker and filter bar scope every panel on the page at once.
Shared filters
Every analytics read accepts these query parameters. Each takes one value, and empty means no filter.
| Parameter | Filters on |
|---|---|
since, until | RFC3339 window. Defaults to the 24 hours before until, until defaults to now. At most 31 days. |
activityClass | business, system or all. Omitted includes all. |
source | Ingest source |
model, provider | Request or response model, model provider |
app, channel | App ID, channel ID |
environment | Environment slug or ID |
apiKey | ID of the API key that sent the event |
user | End-user ID |
service, operation | service.name, operation or span name |
errorType | Error type |
filterTagKey + filterTagValue | One custom attribute equal to one value |
On the GET reads, an API key bound to an app or environment is always confined
to it, whatever app or environment it sends. POST /analytics/diff
currently applies the cohort’s app and environment as sent, so set them
explicitly when you call it with a bound key.
The endpoints
| Endpoint | Returns |
|---|---|
GET /analytics/timeseries | Per-bucket event, trace and error counts, input/output/cache/reasoning/total tokens, cost, average duration and time to first token. bucket is hour (default) or day. |
GET /analytics/latency | p50, p95, p99 and max of duration and time to first token |
GET /analytics/breakdown | Top values of one dimension with counts, errors, tokens, cost and average duration. limit default 50, max 500. |
GET /analytics/overview | Timeseries, latency and several breakdowns in one call. dimensions is a comma-separated list, default model,provider,status. |
GET /analytics/heatmap | Counts per time bucket and duration band. bucket is minute, hour (default) or day; buckets is the number of duration bands (default 25, max 100); scale is log (default) or linear. |
POST /analytics/diff | Attributes ranked by how over-represented their values are in a selection cohort versus a baseline |
GET /analytics/ingestion-status | everIngested: whether any event has ever arrived for the organisation, optionally for one environment |
Breakdown dimension values: model (default), provider, status,
source, app, channel, apiKey, user, agent, tool, eventType,
finishReason, semanticKind, service, operation, errorType, and tag
(a custom attribute named by tagKey).
curl -s "https://api.axonpush.xyz/analytics/timeseries?environment=prod&bucket=hour" \
-H "X-API-Key: $AXONPUSH_API_KEY"
curl -s "https://api.axonpush.xyz/analytics/breakdown?environment=prod&dimension=model&limit=10" \
-H "X-API-Key: $AXONPUSH_API_KEY"Attribute diff
POST /analytics/diff compares two cohorts. Each cohort takes the shared
filters as JSON fields, plus errorsOnly, minDurationMs and
maxDurationMs. For each attribute key it compares the value distribution in
both cohorts and ranks keys by how much more often a value appears in the
selection.
{
"selection": { "environment": "prod", "minDurationMs": 5000 },
"baseline": { "environment": "prod" },
"limit": 10
}Without keys, the most recently seen cataloged attribute keys are compared.
At most 20 attributes are returned, with up to 10 values each.
Custom dimensions
Every attribute you stamp on a span or event is kept, and any of them can be
used to break down or filter analytics. Add a tenant, plan or
participant_role attribute and you can trend and compare your traffic by
it, with no schema to declare.
Stamp the attribute
Use whatever your stack already uses to attach attributes:
- OpenTelemetry:
span.set_attribute("plan", "enterprise")on the current span. - SDK events: put the key in the event’s
attributes. See SDK events. - Structured logs: add the key as a structured field.
Discover what exists
As events arrive, axonpush records the attribute keys (span and resource attributes) and a bounded set of their values in a catalog per environment.
curl -s "https://api.axonpush.xyz/analytics/dimensions?environment=prod" \
-H "X-API-Key: $AXONPUSH_API_KEY"
curl -s "https://api.axonpush.xyz/analytics/dimensions/values?key=plan&environment=prod" \
-H "X-API-Key: $AXONPUSH_API_KEY"Both return the most recently seen entries first (limit default 50, max
500). key is required on the values call.
Slice by it
- Rank values:
GET /analytics/breakdown?dimension=tag&tagKey=plan - Filter any read to one value: add
filterTagKey=plan&filterTagValue=enterpriseto timeseries, latency, breakdown, overview or heatmap.
“How is enterprise traffic trending and how slow is it?” is a timeseries and a latency read with the same two filter parameters.
Naming and limits
Use stable, low-cardinality keys and values. The catalog is built for facets, not identifiers:
- At most 64 attributes per event are extracted. Keys longer than 128 characters and values longer than 256 are not.
- Values that look like IDs (UUIDs, hex runs of 32+ characters, digit runs of 16+) and redacted or truncated values are skipped.
- Values longer than 96 characters are not added to the value list.
- Each event adds at most 24 catalog entries, and a key or value already seen
is refreshed about once an hour, so
lastSeenis approximate. - A new attribute applies to new traffic only. Nothing is backfilled.
Put per-request identifiers in the payload, not in an attribute you plan to group by.
The catalog only affects discovery. Filtering with filterTagKey or breaking
down with dimension=tag reads the stored attributes directly, so it works
for any key you know the name of.
Caching and limits
- Timeseries, latency, breakdown and overview results are cached for 15
seconds per identical query. Pass
fresh=trueto bypass the cache. Cached responses carry anX-Axonpush-As-Ofheader. - The window can be at most 31 days.
- Reads run under a 20-second server deadline.
- Cost is summed from events that carry a cost. Events with unknown cost add nothing, so treat cost as a lower bound (“Known cost” in the dashboard).
Related
- Metrics, Sentry counters, gauges and distributions
- Alerts, get notified when a number crosses a threshold
- Activity, business entities and funnels from workspace observations
- API:
analytics.timeseries,analytics.breakdown,analytics.latency,analytics.overview,analytics.heatmap,analytics.diff,analytics.dimensions,analytics.dimensionValues,analytics.ingestionStatus - MCP tools: the
analytics_*tools