UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTelemetryRouter Class Reference

#include <TelemetryRouter.h>

Public Member Functions

 FTelemetryRouter ()
 
 ~FTelemetryRouter ()
 
template<typename DATA_TYPE >
void ProvideTelemetry (const DATA_TYPE &Data)
 
template<typename DATA_TYPE >
FDelegateHandle OnTelemetry (TDelegate< void(const DATA_TYPE &)> Sink)
 
template<typename DATA_TYPE , typename CALLABLE , typename = std::enable_if_t<std::is_invocable_v<CALLABLE, const DATA_TYPE&>>>
FDelegateHandle OnTelemetry (CALLABLE &&Sink)
 
template<typename DATA_TYPE >
void UnregisterTelemetrySink (FDelegateHandle Handle)
 

Static Public Member Functions

static TELEMETRYUTILS_API FTelemetryRouterGet ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FTelemetryRouter()

FTelemetryRouter::FTelemetryRouter ( )

◆ ~FTelemetryRouter()

FTelemetryRouter::~FTelemetryRouter ( )

Member Function Documentation

◆ Get()

FTelemetryRouter & FTelemetryRouter::Get ( )
static

◆ OnTelemetry() [1/2]

template<typename DATA_TYPE , typename CALLABLE , typename = std::enable_if_t<std::is_invocable_v<CALLABLE, const DATA_TYPE&>>>
FDelegateHandle FTelemetryRouter::OnTelemetry ( CALLABLE &&  Sink)
inline

Registers a callable object as a callback receive telemetry of a certain type.

Returns
a handle that can be used to unregister this sink later so it is no longer called.

◆ OnTelemetry() [2/2]

template<typename DATA_TYPE >
FDelegateHandle FTelemetryRouter::OnTelemetry ( TDelegate< void(const DATA_TYPE &)>  Sink)
inline

Registers a delegate as callback to receive telemetry of a certain type.

Returns
a handle that can be used to unregister this sink later so it is no longer called.

◆ ProvideTelemetry()

template<typename DATA_TYPE >
void FTelemetryRouter::ProvideTelemetry ( const DATA_TYPE Data)
inline

Sends data in a type-safe manner to consumers expecting this data type.

Parameters
DataStrongly typed data to be sent. Type must implement a static method called GetTelemetryID returning an FGuid.

◆ UnregisterTelemetrySink()

template<typename DATA_TYPE >
void FTelemetryRouter::UnregisterTelemetrySink ( FDelegateHandle  Handle)
inline

Removes a previously registered callback.


The documentation for this class was generated from the following files: