Navigation
API > API/Runtime > API/Runtime/TelemetryUtils
Provides an interface for routing structured telemetry data between prooducers (engine/editor systems) and consumers (modules which will format the data for a particular telemetry endpoint)
Usage: Declare a unique type for telemetry data. This type needs a static FGuid data member called TelemetryID. Provide data to any interested aggregators with the method ProvideTelemetry. Aggregators can register a callback for telemetry data with the method OnTelemetry.
The guid associated with a type for routing should not be relied on by consumers to be stable across engine versions or even across different processes, it is only used for runtime routing purposes. It should not be sent to telemetry endpoints.
@thread_safety Functions are internally synchronized. Re-entrant calls to the public API during callbacks are unsupported. Data is routed on the same thread it is provided. Users should copy data and schedule tasks to execute on a specified thread if they require that.
| Name | FTelemetryRouter |
| Type | class |
| Header File | /Engine/Source/Runtime/Analytics/TelemetryUtils/Public/TelemetryRouter.h |
| Include Path | #include "TelemetryRouter.h" |
Syntax
class FTelemetryRouter
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTelemetryRouter() |
TelemetryRouter.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FTelemetryRouter() |
TelemetryRouter.h |
Structs
| Name | Remarks |
|---|---|
| FSinkSet |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| KeyToSinks | TMap< FGuid, FSinkSet > | TelemetryRouter.h | ||
| SinkLock | FRWLock | TelemetryRouter.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDelegateHandle OnTelemetry
(
TDelegate< void(const DATA_TYPE&)> Sink |
Registers a delegate as callback to receive telemetry of a certain type. | TelemetryRouter.h | |
FDelegateHandle OnTelemetry
(
CALLABLE&& Sink |
Registers a callable object as a callback receive telemetry of a certain type. | TelemetryRouter.h | |
void ProvideTelemetry
(
const DATA_TYPE& Data |
Sends data in a type-safe manner to consumers expecting this data type. | TelemetryRouter.h | |
void UnregisterTelemetrySink
(
FDelegateHandle Handle |
Removes a previously registered callback. | TelemetryRouter.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FTelemetryRouter & Get() |
TelemetryRouter.h |