![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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 |
Static Public Member Functions | |
| static bool | IsAvailable () |
| static STUDIOTELEMETRY_API FStudioTelemetry & | Get () |
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
| typedef TFunction<void(const FString& EventName, const TArray<FAnalyticsEventAttribute>& Attrs)> FStudioTelemetry::OnRecordEventCallback |
| FStudioTelemetry::DECLARE_MULTICAST_DELEGATE | ( | FOnEndSession | ) |
| FStudioTelemetry::DECLARE_MULTICAST_DELEGATE | ( | FOnStartSession | ) |
Delegates for event callbacks
| FStudioTelemetry::DECLARE_MULTICAST_DELEGATE_TwoParams | ( | FOnRecordEvent | , |
| const FString & | , | ||
| const TArray< FAnalyticsEventAttribute > & | |||
| ) |
| void FStudioTelemetry::EndSession | ( | ) |
Ends an existing analytics session
| bool FStudioTelemetry::EndSpan | ( | const FName | Name, |
| const TArray< FAnalyticsEventAttribute > & | AdditionalAttributes = {} |
||
| ) |
End an existing span by name
| bool FStudioTelemetry::EndSpan | ( | TSharedPtr< IAnalyticsSpan > | Span, |
| const TArray< FAnalyticsEventAttribute > & | AdditionalAttributes = {} |
||
| ) |
End an existing span
| void FStudioTelemetry::FlushEvents | ( | ) |
Thread safe method to flush all events on all registered analytics providers
|
static |
Access to the module singleton
|
inline |
|
inline |
|
inline |
| TWeakPtr< IAnalyticsProvider > FStudioTelemetry::GetProvider | ( | ) |
Access to the broadcast analytics provider for the system
| TWeakPtr< IAnalyticsProvider > FStudioTelemetry::GetProvider | ( | const FString & | ProviderName | ) |
Access to the a specific named analytics provider within the system
| TSharedPtr< IAnalyticsSpan > FStudioTelemetry::GetSessionSpan | ( | ) | const |
Get the root session span
| TSharedPtr< IAnalyticsSpan > FStudioTelemetry::GetSpan | ( | const FName | Name | ) |
Get an active span by name, non active spans will not be available
| TWeakPtr< IAnalyticsTracer > FStudioTelemetry::GetTracer | ( | ) |
Access to the tracer for the system
| bool FStudioTelemetry::IsSessionRunning | ( | ) | const |
Is Session Running
| 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
| void FStudioTelemetry::RecordEvent | ( | const FString & | EventName, |
| const TArray< FAnalyticsEventAttribute > & | Attributes = {} |
||
| ) |
Thread safe method to record an event to all registered analytics providers
| 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
| 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
| bool FStudioTelemetry::StartSession | ( | ) |
Starts a new analytics session. Returns true if the session was already running or started successfully
| TSharedPtr< IAnalyticsSpan > FStudioTelemetry::StartSpan | ( | const FName | Name, |
| const TArray< FAnalyticsEventAttribute > & | AdditionalAttributes = {} |
||
| ) |
Start a new span specifying the parent
| TSharedPtr< IAnalyticsSpan > FStudioTelemetry::StartSpan | ( | const FName | Name, |
| TSharedPtr< IAnalyticsSpan > | ParentSpan, | ||
| const TArray< FAnalyticsEventAttribute > & | AdditionalAttributes = {} |
||
| ) |
Start a new span specifying the parent