FEATURES

Usage & analytics

Metered metrics per tenant and environment.

Overview

Metered metrics per tenant and environment.

Who should use this

Operators tracking chat volume, API calls, or billing meters.

Core concepts

metricKey + quantity records aggregated in GET /usage.

Setup

Enable usage_metering → query GET /usage?metricKey=chat_messages.

Required entitlement

usage_metering

Required permissions

usage.view

REST API

GET /tenants/{tenantId}/usage

SDK (@startupcore/api-client)

startupCore.usage.get(tenantId, { metricKey }).

React components

<UsageSummary metrics={...} />, <UsageChart series={...} />.

Security notes

Usage may contain PII in metadata — restrict audit role access.

Troubleshooting

Empty totals — events async via worker queue.