Navigation
API > API/Runtime > API/Runtime/Analytics > API/Runtime/Analytics/Interfaces
Inheritance Hierarchy
- FNoncopyable
- IAnalyticsSpan
- FAnalyticsSpan
References
| Module | Analytics |
| Header | /Engine/Source/Runtime/Analytics/Analytics/Public/Interfaces/IAnalyticsTracer.h |
| Include | #include "Interfaces/IAnalyticsTracer.h" |
Syntax
class IAnalyticsSpan : private FNoncopyable
Remarks
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
Constructors
| Type | Name | Description | |
|---|---|---|---|
IAnalyticsSpan
(
const FName Name |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddAttributes
(
const TArray< FAnalyticsEventAttribute >& AdditionalAttributes |
Append attributes to this span context | |
| void | End
(
const TArray< FAnalyticsEventAttribute >& AdditionalAttributes |
End this span | |
| const TArray< FAnalyticsEventAttribute > & | Get context attributes for the span | ||
| double | GetDuration () |
Get the span duration in seconds | |
| bool | GetIsActive () |
Is the span active? | |
| const FName & | GetName () |
Get the internal name for the span | |
| TSharedPtr< IAnalyticsSpan > | Get the parent span | ||
| uint32 | Get the scope depth for the span | ||
| void | RecordEvent
(
const FString& EventName, |
Record an event from this span, appends the attributes for the span context | |
| void | SetParentSpan
(
TSharedPtr< IAnalyticsSpan > ParentSpan |
Set the parent span | |
| void | SetProvider
(
TSharedPtr< IAnalyticsProvider > AnalyticsProvider |
Sets the analytics provider for the tracer | |
| void | SetStackDepth
(
uint32 Depth |
Set the scope depth for the span | |
| void | Start
(
const TArray< FAnalyticsEventAttribute >& AdditionalAttributes |
Start this span |