Navigation
API > API/Runtime > API/Runtime/StudioTelemetry
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
| Name | FStudioTelemetry |
| Type | class |
| Header File | /Engine/Source/Runtime/StudioTelemetry/Public/StudioTelemetry.h |
| Include Path | #include "StudioTelemetry.h" |
Syntax
class FStudioTelemetry : public IModuleInterface
Implements Interfaces
Classes
| Name | Remarks |
|---|---|
| ScopedSpan | Scoped Span helper class |
Structs
| Name | Remarks |
|---|---|
| FConfig |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnEndSession | TMulticastDelegate_NoParams< void > | StudioTelemetry.h | |
| FOnRecordEvent | TMulticastDelegate_TwoParams< void, const FString &, const TArray< FAnalyticsEventAttribute > & > | StudioTelemetry.h | |
| FOnStartSession | TMulticastDelegate_NoParams< void > | Delegates for event callbacks | StudioTelemetry.h |
| OnRecordEventCallback | TFunction< void(const FString &EventName, const TArray< FAnalyticsEventAttribute > &Attrs)> | StudioTelemetry.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnalyticsProvider | TSharedPtr< FAnalyticsProviderBroadcast > | StudioTelemetry.h | ||
| AnalyticsTracer | TSharedPtr< IAnalyticsTracer > | StudioTelemetry.h | ||
| Config | FConfig | StudioTelemetry.h | ||
| CriticalSection | FCriticalSection | StudioTelemetry.h | ||
| OnEndSession | FOnEndSession | StudioTelemetry.h | ||
| OnRecordEvent | FOnRecordEvent | StudioTelemetry.h | ||
| OnStartSession | FOnStartSession | StudioTelemetry.h | ||
| RecordEventCallback | OnRecordEventCallback | StudioTelemetry.h | ||
| SessionGUID | FGuid | StudioTelemetry.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void EndSession() |
Ends an existing analytics session | StudioTelemetry.h | |
bool EndSpan
(
const FName Name, |
End an existing span by name | StudioTelemetry.h | |
bool EndSpan
(
TSharedPtr< IAnalyticsSpan > Span, |
End an existing span | StudioTelemetry.h | |
void FlushEvents() |
Thread safe method to flush all events on all registered analytics providers | StudioTelemetry.h | |
FOnEndSession & GetOnEndSession() |
StudioTelemetry.h | ||
FOnRecordEvent & GetOnRecordEvent() |
StudioTelemetry.h | ||
FOnStartSession & GetOnStartSession() |
StudioTelemetry.h | ||
TWeakPtr< IAnalyticsProvider > GetProvider
(
const FString& ProviderName |
Access to the a specific named analytics provider within the system | StudioTelemetry.h | |
TWeakPtr< IAnalyticsProvider > GetProvider () |
Access to the broadcast analytics provider for the system | StudioTelemetry.h | |
TSharedPtr< IAnalyticsSpan > GetSessionSpan() |
Get the root session span | StudioTelemetry.h | |
TSharedPtr< IAnalyticsSpan > GetSpan
(
const FName Name |
Get an active span by name, non active spans will not be available | StudioTelemetry.h | |
TWeakPtr< IAnalyticsTracer > GetTracer() |
Access to the tracer for the system | StudioTelemetry.h | |
bool IsSessionRunning() |
Is Session Running | StudioTelemetry.h | |
void RecordEvent
(
const FString& EventName, |
Thread safe method to record an event to all registered analytics providers | StudioTelemetry.h | |
void RecordEvent
(
const FName CategoryName, |
Thread safe method to record an event to all registered analytics providers | StudioTelemetry.h | |
void RecordEventToProvider
(
const FString& ProviderName, |
Thread safe method to record an event to the specifically named analytics provider | StudioTelemetry.h | |
void SetRecordEventCallback
(
OnRecordEventCallback |
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 | StudioTelemetry.h | |
void StartSession() |
Starts a new analytics session | StudioTelemetry.h | |
TSharedPtr< IAnalyticsSpan > StartSpan
(
const FName Name, |
Start a new span specifying the parent | StudioTelemetry.h | |
TSharedPtr< IAnalyticsSpan > StartSpan
(
const FName Name, |
Start a new span specifying the parent | StudioTelemetry.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FStudioTelemetry & Get() |
Access to the module singleton | StudioTelemetry.h | |
static bool IsAvailable() |
Check whether the module is available | StudioTelemetry.h |