FAnalyticsProviderETEventCache

Mixin class for Epic Telemetry implementors.

Windows
MacOS
Linux

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

Name Description

Public function

FAnalyticsProviderETEventCache

(
    int32 MaximumPayloadSize,
    int32 InPreallocatedPayloadSize
)

Default ctor.

Functions

Name Description

Public function

void

 

AddToCache

(
    FString EventName
)

Adds a new event to the cache.

Public function

void

 

AddToCache

(
    FString EventName,
    const TArray< FAnalyticsEventAttrib...
)

Adds a new event to the cache.

Public function Const

bool

 

CanFlush()

Determines whether we have anything we need to flush, either a queued flush or existing events in the payload.

Public function

TArray< uint...

 

FlushCacheUTF8()

Flushes the cache as a UTF8 char array.

Public function Const

FAnalyticsEv...

 

GetDefaultAttribute

(
    int32 AttributeIndex
)

Range checking is not done, similar to TArray.

Public function Const

int32

 

GetDefaultAttributeCount()

Public function Const

TArray< FAna...

 

GetDefaultAttributes()

Public function Const

int

 

GetNumCachedEvents()

Gets the number of cached events (doesn't include any flushes that are already queued for flush).

Public function Const

int32

 

GetSetPreallocatedPayloadSize()

Gets the preallocated size of the payload buffer.

Public function Const

bool

 

HasFlushesQueued()

Lets external code know that there are payloads queued for flush.

Public function

void

 

SetDefaultAttributes

(
    TArray< FAnalyticsEventAttribute > ...
)

Sets an array of attributes that will automatically be appended to any event that is sent.

Public function

void

 

SetPreallocatedPayloadSize

(
    int32 InSetPreallocatedPayloadSize
)

Sets the preallocated payload size

Classes

Name

Description

Public class

Lock

For when you need to take a lock across multiple API calls

Deprecated Functions

Name Description

Public function

FString

 

FlushCache

(
    SIZE_T* OutEventCount
)

This method has been deprecated, use FlushCacheUTF8() instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss