Skip to Content
ConceptsRollups and Analytics

Rollups and Analytics

Chirpier exposes two different ways to read an event.

Rollup Routes
Use the event logs reference for exact `period`, `limit`, and `offset` behavior.
Analytics Routes
Use the analytics reference for supported `view`, `period`, and `previous` combinations.

Rollups

Use event logs when you need the raw time-bucketed history for an event.

Supported rollup periods:

  • minute
  • hour
  • day

Endpoint:

GET /v1.0/events/:eventID/logs?period=minute|hour|day&limit=&offset=

What rollups store

Each rollup bucket aggregates all logs that fell within that time window:

FieldDescription
countNumber of logs in the bucket
valueSum of all value fields
minSmallest value logged
maxLargest value logged
squaresSum of squared values (used to compute variance and standard deviation)

Chirpier stores these pre-aggregated buckets rather than raw log data. This is how it supports average, p95_est, and p99_est aggregates in policies without retaining every individual log long-term.

Rollups are best for:

  • charts
  • recent history inspection
  • building your own comparisons
  • validating policy inputs

Analytics windows

Use analytics windows when you need Chirpier to compare the current window to a previous one.

The response schema stays the same for every analytics window. current_* always refers to the requested window, and previous_* always refers to the comparison window selected by the previous query parameter.

Endpoint:

GET /v1.0/events/:eventID/analytics?view=window&period=...&previous=...

Supported analytics periods:

  • 1h
  • 1d
  • 7d
  • 1m

Supported comparison keys:

  • previous_window
  • previous_1d
  • previous_7d
  • previous_1m

Common comparison examples:

  • period=1h&previous=previous_window — this hour vs the previous hour
  • period=1h&previous=previous_1d — this hour vs the same hour yesterday
  • period=1d&previous=previous_7d — today vs the same day last week
  • period=7d&previous=previous_window — this week vs last week
  • period=1m&previous=previous_window — this month vs last month

For the full combination table, see the Analytics API reference.

Analytics windows return a comparison summary rather than a time series. Typical response fields include:

  • current_value, current_count, current_mean, current_stddev
  • previous_value, previous_count, previous_mean, previous_stddev
  • value_delta, count_delta, mean_delta
  • value_pct_change, count_pct_change, mean_pct_change

Choosing between them

Use rollups when you need the time series.

Use analytics windows when you need a precomputed comparison summary.

For route-level details, see Event logs and Analytics API.

Last updated on