Overview
@elata-biosciences/app-metrics gives your app a per-user store for event
records and scores, plus reportAffect for contributing to the user’s
cross-app biometric Score.
API
Limits
- Each record can be up to 64 KB.
- Each (user, app) pair has a 5 MB storage quota.
- Calls fail with
quota_exceeded,invalid_payload, orrate_limitedwhen you exceed limits.
MetricsClientError, whose code is one of the host codes
above or handshake_timeout, disposed, or transport.
reportAffect
reportAffect sends a derived session result, never raw signal, to Elata
so it can contribute to the user’s cross-app biometric Score.
Two things must be true or the call fails with
scope_denied:
- Your app has the
biometricsscope. Contact the Elata team to enable it for your app. - The user has consented. Ask with
elata:consent:request. Elata also re-checks consent on the server for every sample.
For hosts
The package also ships a host entry,@elata-biosciences/app-metrics/host
(createMetricsHost), used by Elata itself. App developers don’t need it.