Skip to main content

Data Model: hbf-stats

Domain objects used by this service. Full schemas: docs/domain-model.md

Objects This Service Uses

ObjectAccessKey Fields Used
Tenantreads via hbf-core-apiid, organizationId, tenantStats, tenantStats.lastStatsUpdate
Organizationreads via hbf-core-apiid, timezone
AnalyticsSummaryDtoreads via hbf-core-apisummary metrics per tenant
Statswrites via hbf-core-apicomputed stats object written to tenant document

Notes

  • No local database. Computes statistics and writes them back to tenant documents in hbf-core.
  • Polls for tenants whose stats are stale (statsUpdateLessThan filter) based on STATS_LIFESPAN_MINUTES.
  • Configurable batch size via NUMBER_OF_TENANTS_TO_BE_UPDATED.
  • Uses hbf-core-api HBFCoreApi client: TenantsClient.list(), TenantsClient.createOrUpdateStats(), OrganizationsClient.find(), AnalyticsClient.getSummary().
  • Reads organization timezone to compute date-range-scoped analytics.