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

#include <StudioTelemetry.h>

+ Inheritance diagram for FStudioTelemetry:

Classes

class  FSessionScope
 
class  FSpanScope
 

Public Types

typedef TFunction< void(const FString &EventName, const TArray< FAnalyticsEventAttribute > &Attrs)> OnRecordEventCallback
 

Public Member Functions

STUDIOTELEMETRY_API TWeakPtr< IAnalyticsProviderGetProvider (const FString &ProviderName)
 
STUDIOTELEMETRY_API TWeakPtr< IAnalyticsProviderGetProvider ()
 
STUDIOTELEMETRY_API TWeakPtr< IAnalyticsTracerGetTracer ()
 
STUDIOTELEMETRY_API bool StartSession ()
 
STUDIOTELEMETRY_API void EndSession ()
 
STUDIOTELEMETRY_API bool IsSessionRunning () const
 
STUDIOTELEMETRY_API void RecordEvent (const FString &EventName, const TArray< FAnalyticsEventAttribute > &Attributes={})
 
STUDIOTELEMETRY_API void RecordEvent (const FName CategoryName, const FString &EventName, const TArray< FAnalyticsEventAttribute > &Attributes={})
 
STUDIOTELEMETRY_API void RecordEventToProvider (const FString &ProviderName, const FString &EventName, const TArray< FAnalyticsEventAttribute > &Attributes={})
 
STUDIOTELEMETRY_API void FlushEvents ()
 
STUDIOTELEMETRY_API TSharedPtr< IAnalyticsSpanStartSpan (const FName Name, const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})
 
STUDIOTELEMETRY_API TSharedPtr< IAnalyticsSpanStartSpan (const FName Name, TSharedPtr< IAnalyticsSpan > ParentSpan, const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})
 
STUDIOTELEMETRY_API bool EndSpan (TSharedPtr< IAnalyticsSpan > Span, const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})
 
STUDIOTELEMETRY_API bool EndSpan (const FName Name, const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})
 
STUDIOTELEMETRY_API TSharedPtr< IAnalyticsSpanGetSpan (const FName Name)
 
STUDIOTELEMETRY_API TSharedPtr< IAnalyticsSpanGetSessionSpan () const
 
STUDIOTELEMETRY_API void SetRecordEventCallback (OnRecordEventCallback)
 
 DECLARE_MULTICAST_DELEGATE (FOnStartSession)
 
FOnStartSessionGetOnStartSession ()
 
 DECLARE_MULTICAST_DELEGATE (FOnEndSession)
 
FOnEndSessionGetOnEndSession ()
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnRecordEvent, const FString &, const TArray< FAnalyticsEventAttribute > &)
 
FOnRecordEventGetOnRecordEvent ()
 
- Public Member Functions inherited from IModuleInterface
virtual ~IModuleInterface ()
 
virtual void StartupModule ()
 
virtual void PreUnloadCallback ()
 
virtual void PostLoadCallback ()
 
virtual void ShutdownModule ()
 
virtual bool SupportsDynamicReloading ()
 
virtual bool SupportsAutomaticShutdown ()
 
virtual bool IsGameModule () const
 

Static Public Member Functions

static bool IsAvailable ()
 
static STUDIOTELEMETRY_API FStudioTelemetryGet ()
 

Detailed Description

Studio Telemetry API

Notes: Interface for adding Studio level Telemetry to products. Studio Telemetry will never function in shipping builds. Developers are encouraged to add post their own development telemetry events via this API. Developers can implement their own IAnalyticsProviderModule where custom recording of Studio Telemetry events to their own Analytics Backend is desired. Custom AnalyticsProviders can be added to the plugin via the .ini. See FAnalyticsProviderLog or FAnalyticsProviderET for example. Telemetry events are recored to all registered IAnalyticsProviders supplied in the .ini file using the FAnalyticsProviderBroadcast provider, except where specifically recorded with the RecordEvent(ProviderName,.. ) API below

Member Typedef Documentation

◆ OnRecordEventCallback

Member Function Documentation

◆ DECLARE_MULTICAST_DELEGATE() [1/2]

FStudioTelemetry::DECLARE_MULTICAST_DELEGATE ( FOnEndSession  )

◆ DECLARE_MULTICAST_DELEGATE() [2/2]

FStudioTelemetry::DECLARE_MULTICAST_DELEGATE ( FOnStartSession  )

Delegates for event callbacks

◆ DECLARE_MULTICAST_DELEGATE_TwoParams()

FStudioTelemetry::DECLARE_MULTICAST_DELEGATE_TwoParams ( FOnRecordEvent  ,
const FString &  ,
const TArray< FAnalyticsEventAttribute > &   
)

◆ EndSession()

void FStudioTelemetry::EndSession ( )

Ends an existing analytics session

◆ EndSpan() [1/2]

bool FStudioTelemetry::EndSpan ( const FName  Name,
const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {} 
)

End an existing span by name

◆ EndSpan() [2/2]

bool FStudioTelemetry::EndSpan ( TSharedPtr< IAnalyticsSpan Span,
const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {} 
)

End an existing span

◆ FlushEvents()

void FStudioTelemetry::FlushEvents ( )

Thread safe method to flush all events on all registered analytics providers

◆ Get()

FStudioTelemetry & FStudioTelemetry::Get ( )
static

Access to the module singleton

◆ GetOnEndSession()

FOnEndSession & FStudioTelemetry::GetOnEndSession ( )
inline

◆ GetOnRecordEvent()

FOnRecordEvent & FStudioTelemetry::GetOnRecordEvent ( )
inline

◆ GetOnStartSession()

FOnStartSession & FStudioTelemetry::GetOnStartSession ( )
inline

◆ GetProvider() [1/2]

TWeakPtr< IAnalyticsProvider > FStudioTelemetry::GetProvider ( )

Access to the broadcast analytics provider for the system

◆ GetProvider() [2/2]

TWeakPtr< IAnalyticsProvider > FStudioTelemetry::GetProvider ( const FString &  ProviderName)

Access to the a specific named analytics provider within the system

◆ GetSessionSpan()

TSharedPtr< IAnalyticsSpan > FStudioTelemetry::GetSessionSpan ( ) const

Get the root session span

◆ GetSpan()

TSharedPtr< IAnalyticsSpan > FStudioTelemetry::GetSpan ( const FName  Name)

Get an active span by name, non active spans will not be available

◆ GetTracer()

TWeakPtr< IAnalyticsTracer > FStudioTelemetry::GetTracer ( )

Access to the tracer for the system

◆ IsAvailable()

static bool FStudioTelemetry::IsAvailable ( )
inlinestatic

Check whether the module is available

◆ IsSessionRunning()

bool FStudioTelemetry::IsSessionRunning ( ) const

Is Session Running

◆ RecordEvent() [1/2]

void FStudioTelemetry::RecordEvent ( const FName  CategoryName,
const FString &  EventName,
const TArray< FAnalyticsEventAttribute > &  Attributes = {} 
)

Thread safe method to record an event to all registered analytics providers

◆ RecordEvent() [2/2]

void FStudioTelemetry::RecordEvent ( const FString &  EventName,
const TArray< FAnalyticsEventAttribute > &  Attributes = {} 
)

Thread safe method to record an event to all registered analytics providers

◆ RecordEventToProvider()

void FStudioTelemetry::RecordEventToProvider ( const FString &  ProviderName,
const FString &  EventName,
const TArray< FAnalyticsEventAttribute > &  Attributes = {} 
)

Thread safe method to record an event to the specifically named analytics provider

◆ SetRecordEventCallback()

void FStudioTelemetry::SetRecordEventCallback ( OnRecordEventCallback  Callback)

Callback for interception of telemetry events recording that can be used by Developers to send telemetry events to their own back end, though it is recommended that Developers implement their own IAnalyticsProvider via their own IAnalyticsProviderModule

◆ StartSession()

bool FStudioTelemetry::StartSession ( )

Starts a new analytics session. Returns true if the session was already running or started successfully

◆ StartSpan() [1/2]

TSharedPtr< IAnalyticsSpan > FStudioTelemetry::StartSpan ( const FName  Name,
const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {} 
)

Start a new span specifying the parent

◆ StartSpan() [2/2]

TSharedPtr< IAnalyticsSpan > FStudioTelemetry::StartSpan ( const FName  Name,
TSharedPtr< IAnalyticsSpan ParentSpan,
const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {} 
)

Start a new span specifying the parent


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