Navigation
API > API/Runtime > API/Runtime/AnalyticsET
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.
| Name | FAnalyticsProviderETEventCache |
| Type | class |
| Header File | /Engine/Source/Runtime/Analytics/AnalyticsET/Public/AnalyticsProviderETEventCache.h |
| Include Path | #include "AnalyticsProviderETEventCache.h" |
Syntax
class FAnalyticsProviderETEventCache
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAnalyticsProviderETEventCache
(
int32 MaximumPayloadSize, |
Default ctor. | AnalyticsProviderETEventCache.h |
Classes
| Name | Remarks |
|---|---|
| Lock | For when you need to take a lock across multiple API calls |
Structs
| Name | Remarks |
|---|---|
| FAnalyticsEventEntry | Analytics event entry to be cached |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedDefaultAttributes | TArray< FAnalyticsEventAttribute > | AnalyticsProviderETEventCache.h | ||
| CachedDefaultAttributeUTF8Stream | TArray< uint8 > | AnalyticsProviderETEventCache.h | ||
| CachedEventEntries | TArray< FAnalyticsEventEntry > | List of analytic events pending a server update . | AnalyticsProviderETEventCache.h | |
| CachedEventsCS | FTransactionallySafeCriticalSection | Critical section for updating the CachedEvents. Mutable to allow const methods to access the list. | AnalyticsProviderETEventCache.h | |
| CachedEventUTF8Stream | TArray< uint8 > | AnalyticsProviderETEventCache.h | ||
| FlushQueue | TArray< TArray< uint8 > > | AnalyticsProviderETEventCache.h | ||
| MaximumPayloadSize | int32 | AnalyticsProviderETEventCache.h | ||
| PreallocatedPayloadSize | int32 | AnalyticsProviderETEventCache.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddToCache
(
FString EventName, |
Adds a new event to the cache. | AnalyticsProviderETEventCache.h | |
void AddToCache
(
FString EventName |
AnalyticsProviderETEventCache.h | ||
bool CanFlush() |
Determines whether we have anything we need to flush, either a queued flush or existing events in the payload. | AnalyticsProviderETEventCache.h | |
| Creates a immediate payload with the existing default attributes | AnalyticsProviderETEventCache.h | ||
FString FlushCache
(
SIZE_T* OutEventCount |
Flushes the cache as a string. | AnalyticsProviderETEventCache.h | |
TArray< uint8 > FlushCacheUTF8 () |
Flushes the cache as a UTF8 char array. | AnalyticsProviderETEventCache.h | |
FAnalyticsEventAttribute GetDefaultAttribute
(
int32 AttributeIndex |
Range checking is not done, similar to TArray. | AnalyticsProviderETEventCache.h | |
int32 GetDefaultAttributeCount() |
AnalyticsProviderETEventCache.h | ||
TArray< FAnalyticsEventAttribute > GetDefaultAttributes() |
AnalyticsProviderETEventCache.h | ||
int GetNumCachedEvents() |
Gets the number of cached events (doesn't include any flushes that are already queued for flush). | AnalyticsProviderETEventCache.h | |
int32 GetSetPreallocatedPayloadSize() |
Gets the preallocated size of the payload buffer. | AnalyticsProviderETEventCache.h | |
bool HasFlushesQueued () |
Lets external code know that there are payloads queued for flush. | AnalyticsProviderETEventCache.h | |
void SetDefaultAttributes
(
TArray< FAnalyticsEventAttribute >&& DefaultAttributes |
Sets an array of attributes that will automatically be appended to any event that is sent. | AnalyticsProviderETEventCache.h | |
void SetPreallocatedPayloadSize
(
int32 InSetPreallocatedPayloadSize |
Sets the preallocated payload size | AnalyticsProviderETEventCache.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void OnStartupModule() |
AnalyticsProviderETEventCache.h |