Skip to main content

Usage & Metrics

The Usage Data Service is responsible for tracking and recording how licenses and features are consumed within the platform.

Functional Overview

  • Usage Journaling: Recording discrete usage events (e.g., document uploads, user logins, feature triggers).
  • Metrics Snapshots: Taking periodic "pictures" of usage to calculate billing or verify license compliance.
  • Compliance Verification: Checking current consumption against the limits defined in the MSA/License.

Major Code Modules (com.sureink.usage)

  • controller: Endpoints for UsageJournal and LicenseSnapshot.
  • repository: Specialized repositories for high-volume data (e.g., UsageJournalRepository, LicenseSnapshotRepository).
  • service: Aggregation and reporting logic for usage trends.
  • client: Fetches current license/subscription state from CloudMsaApplication.

Linkages and References

  • Enforcer: CloudMsaApplication queries this service to determine if a customer can perform a certain action based on their remaining license balance.
  • Storage: Typically uses a dedicated schema for high-volume journal entries.