FirstPartyEventLogger class

First-party event logging service with batched export and retry.

Constructors

FirstPartyEventLogger({required String endpoint, int maxBatchSize = 200, int maxAttempts = 8, bool skipAuth = false, int baseBackoffDelayMs = 500, int maxBackoffDelayMs = 30000, required bool isKilled(), required Future<Map<String, String>> getAuthHeaders(), required Future<void> httpPost(String url, Object body, Map<String, String> headers), required String getUserAgent()})

Properties

baseBackoffDelayMs int
final
endpoint String
final
getAuthHeaders Future<Map<String, String>> Function()
final
getUserAgent String Function()
final
hashCode int
The hash code for this object.
no setterinherited
httpPost Future<void> Function(String url, Object body, Map<String, String> headers)
final
isKilled bool Function()
final
maxAttempts int
final
maxBackoffDelayMs int
final
maxBatchSize int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
skipAuth bool
final

Methods

logEvent(FirstPartyEvent event) → void
Enqueue an event for export.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() Future<void>
Flush and shut down.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited