Navigation
API > API/Runtime > API/Runtime/AnalyticsET
References
| Module | AnalyticsET |
| Header | /Engine/Source/Runtime/Analytics/AnalyticsET/Public/AnalyticsProviderETEventCache.h |
| Include | #include "AnalyticsProviderETEventCache.h" |
Syntax
class FAnalyticsProviderETEventCache
Remarks
Mixin class for Epic Telemetry implementors. The purpose of this class is to support the concept of caching events that are added via the standard RecordEvent API and serializing them into a payload in a Json format compatible with Epic's backend data collectors. The job of transporting these payloads to an external collector (generally expected to be via HTTP) is left to higher level classes to implement.
All public APIs in this class are threadsafe. Implemented via crappy critical sections for now, but they are safe.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FAnalyticsProviderETEventCache
(
int32 MaximumPayloadSize, |
Default ctor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddToCache
(
FString EventName |
Adds a new event to the cache. | |
| void | AddToCache
(
FString EventName, |
Adds a new event to the cache. | |
| bool | CanFlush () |
Determines whether we have anything we need to flush, either a queued flush or existing events in the payload. | |
| TArray< uint8 > | Flushes the cache as a UTF8 char array. | ||
| FAnalyticsEventAttribute | GetDefaultAttribute
(
int32 AttributeIndex |
Range checking is not done, similar to TArray. | |
| int32 | |||
| TArray< FAnalyticsEventAttribute > | |||
| int | Gets the number of cached events (doesn't include any flushes that are already queued for flush). | ||
| int32 | Gets the preallocated size of the payload buffer. | ||
| bool | Lets external code know that there are payloads queued for flush. | ||
| void | SetDefaultAttributes
(
TArray< FAnalyticsEventAttribute >&& DefaultAttributes |
Sets an array of attributes that will automatically be appended to any event that is sent. | |
| void | SetPreallocatedPayloadSize
(
int32 InSetPreallocatedPayloadSize |
Sets the preallocated payload size |
Classes
| Type | Name | Description | |
|---|---|---|---|
| Lock | For when you need to take a lock across multiple API calls |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| FString | FlushCache
(
SIZE_T* OutEventCount |
This method has been deprecated, use FlushCacheUTF8() instead. |