AttributedMetricClient

Client for collecting and emitting attributed metrics.

Functions

Link copied to clipboard
abstract fun collectEvent(eventName: String)

Stores an event occurrence for later analysis. Does nothing if the client is not active.

Link copied to clipboard
abstract fun emitMetric(metric: AttributedMetric)

Emits a metric with its parameters if the client is active. Does nothing if the client is not active.

Link copied to clipboard
abstract suspend fun getEventStats(eventName: String, days: Int): EventStats

Calculates statistics for a specific event over a time period. Returns zero stats if the client is not active.