UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IAnalyticsSpan Class Referenceabstract

#include <IAnalyticsTracer.h>

+ Inheritance diagram for IAnalyticsSpan:

Public Member Functions

 IAnalyticsSpan (const FName Name)
 
virtual ~IAnalyticsSpan ()
 
virtual void SetProvider (TSharedPtr< IAnalyticsProvider > AnalyticsProvider)=0
 
virtual void Start (const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})=0
 
virtual void End (const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})=0
 
virtual void AddAttributes (const TArray< FAnalyticsEventAttribute > &AdditionalAttributes)=0
 
virtual void RecordEvent (const FString &EventName, const TArray< FAnalyticsEventAttribute > &AdditionalAttributes={})=0
 
virtual const FNameGetName () const =0
 
virtual const TArray< FAnalyticsEventAttribute > & GetAttributes () const =0
 
virtual void SetStackDepth (uint32 Depth)=0
 
virtual uint32 GetStackDepth () const =0
 
virtual double GetDuration () const =0
 
virtual double GetElapsedTime ()=0
 
virtual bool GetIsActive () const =0
 
virtual FGuid GetId () const =0
 

Detailed Description

IAnalyticsSpan Interface

Inspired by OpenTelemety model for Tracer/Span. A span should be used to measure long running actions. It can be thought of as hierarchical timer object. A span capture event state within an array of EventAattributes and emit them with every event sent from this span A span can only be started via a IAnalyticsTracer interface, but can be Ended on demand Spans are arranged hierarchically and the expected behavior is for the parent span to end the spans of its children on during it's own End call Elapsed time should be calculated on each call, but on when the span is active Will send telemetry events via the IAnalyticsProvider

Constructor & Destructor Documentation

◆ IAnalyticsSpan()

IAnalyticsSpan::IAnalyticsSpan ( const FName  Name)
inline

◆ ~IAnalyticsSpan()

virtual IAnalyticsSpan::~IAnalyticsSpan ( )
inlinevirtual

Member Function Documentation

◆ AddAttributes()

virtual void IAnalyticsSpan::AddAttributes ( const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes)
pure virtual

Append attributes to this span context

Implemented in FAnalyticsSpan.

◆ End()

virtual void IAnalyticsSpan::End ( const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {})
pure virtual

End this span

Implemented in FAnalyticsSpan.

◆ GetAttributes()

virtual const TArray< FAnalyticsEventAttribute > & IAnalyticsSpan::GetAttributes ( ) const
pure virtual

Get context attributes for the span

Implemented in FAnalyticsSpan.

◆ GetDuration()

virtual double IAnalyticsSpan::GetDuration ( ) const
pure virtual

Get the span duration in seconds

Implemented in FAnalyticsSpan.

◆ GetElapsedTime()

virtual double IAnalyticsSpan::GetElapsedTime ( )
pure virtual

Get the elapsed time for the span in seconds

Implemented in FAnalyticsSpan.

◆ GetId()

virtual FGuid IAnalyticsSpan::GetId ( ) const
pure virtual

Implemented in FAnalyticsSpan.

◆ GetIsActive()

virtual bool IAnalyticsSpan::GetIsActive ( ) const
pure virtual

Implemented in FAnalyticsSpan.

◆ GetName()

virtual const FName & IAnalyticsSpan::GetName ( ) const
pure virtual

Get the internal name for the span

Implemented in FAnalyticsSpan.

◆ GetStackDepth()

virtual uint32 IAnalyticsSpan::GetStackDepth ( ) const
pure virtual

Get the scope depth for the span

Implemented in FAnalyticsSpan.

◆ RecordEvent()

virtual void IAnalyticsSpan::RecordEvent ( const FString &  EventName,
const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {} 
)
pure virtual

Record an event from this span, appends the attributes for the span context

Implemented in FAnalyticsSpan.

◆ SetProvider()

virtual void IAnalyticsSpan::SetProvider ( TSharedPtr< IAnalyticsProvider AnalyticsProvider)
pure virtual

Sets the analytics provider for the tracer

Implemented in FAnalyticsSpan.

◆ SetStackDepth()

virtual void IAnalyticsSpan::SetStackDepth ( uint32  Depth)
pure virtual

Set the scope depth for the span

Implemented in FAnalyticsSpan.

◆ Start()

virtual void IAnalyticsSpan::Start ( const TArray< FAnalyticsEventAttribute > &  AdditionalAttributes = {})
pure virtual

Start this span

Implemented in FAnalyticsSpan.


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