Object TelemetryComponent
-
- All Implemented Interfaces:
-
com.inmobi.commons.core.metrics.PayloadProvider,com.inmobi.commons.core.metrics.RemoteSyncListener
public class TelemetryComponent implements PayloadProvider, RemoteSyncListener
-
-
Field Summary
Fields Modifier and Type Field Description private final StringTAGprivate final ConfigUpdateListenertelemetryConfigUpdateListenerpublic final static TelemetryComponentINSTANCE
-
Method Summary
Modifier and Type Method Description final static Unitstart()final static Unitstop()final static UnitemitEventBusDiff(Map<String, Pair<Long, Long>> tagCounts)Emits a single telemetry event carrying the top tags with the largest subscribe/unsubscribe imbalance collected by com.inmobi.commons.core.eventbus.MultiEventBus since the last emit, so subscribers that never unsubscribe (or double-unsubscribe) can be spotted. final static UnitsubmitEvent(String eventType, Map<String, Object> keyValueMap, TelemetryConstant.TelemetryEventType telemetryEventType)UnitonRemoteSent(List<Integer> eventIds, Boolean isSuccess)EventPayloadgetPayload()final UnitsetUrl(String url)final Unitreset()final StringgetTAG()final ConfigUpdateListenergetTelemetryConfigUpdateListener()-
-
Method Detail
-
start
@WorkerThread() final static Unit start()
-
stop
@WorkerThread() final static Unit stop()
-
emitEventBusDiff
final static Unit emitEventBusDiff(Map<String, Pair<Long, Long>> tagCounts)
Emits a single telemetry event carrying the top tags with the largest subscribe/unsubscribe imbalance collected by com.inmobi.commons.core.eventbus.MultiEventBus since the last emit, so subscribers that never unsubscribe (or double-unsubscribe) can be spotted. Balanced tags (subscribeCount == unsubscribeCount) carry no leak signal and are dropped. Each kept diff is encoded as a signed log2 bucket (-10..+10) into TelemetryEvent.TRIGGER - the real trigger (periodic/app_foreground) is intentionally not sent, since Dataverse only exposes a fixed dimension set and "Telemetry Trigger" is the only free-text field available for this event.
- Parameters:
tagCounts- map of subscriber tag to (subscribeCount, unsubscribeCount)
-
submitEvent
final static Unit submitEvent(String eventType, Map<String, Object> keyValueMap, TelemetryConstant.TelemetryEventType telemetryEventType)
-
onRemoteSent
Unit onRemoteSent(List<Integer> eventIds, Boolean isSuccess)
-
getPayload
EventPayload getPayload()
-
getTelemetryConfigUpdateListener
final ConfigUpdateListener getTelemetryConfigUpdateListener()
-
-
-
-