Open 3D Engine AWSMetrics Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AWSMetrics::MetricsEvent Class Reference

Metrics event is used to represent one event which contains a collection of metrics attributes. More...

#include <MetricsEvent.h>

Public Member Functions

void AddAttribute (const MetricsAttribute &attribute)
 
void AddAttributes (const AZStd::vector< MetricsAttribute > &attributes)
 
int GetNumAttributes () const
 
size_t GetSizeInBytes () const
 
bool SerializeToJson (AWSCore::JsonWriter &writer) const
 
bool ReadFromJson (rapidjson::Value &metricsObjVal)
 
bool ValidateAgainstSchema ()
 
void MarkFailedSubmission ()
 Add the count of failures for sending the metrics event.
 
int GetNumFailures () const
 
void SetEventPriority (int priority)
 
int GetEventPriority () const
 

Detailed Description

Metrics event is used to represent one event which contains a collection of metrics attributes.

Member Function Documentation

◆ AddAttribute()

void AWSMetrics::MetricsEvent::AddAttribute ( const MetricsAttribute attribute)

Add a new attribute to the metrics.

Parameters
attributeAttribute to add.

◆ AddAttributes()

void AWSMetrics::MetricsEvent::AddAttributes ( const AZStd::vector< MetricsAttribute > &  attributes)

Add attributes to the metrics event.

Parameters
attributesList of attributes to append.

◆ GetEventPriority()

int AWSMetrics::MetricsEvent::GetEventPriority ( ) const

Get the priority of the metrics event.

Returns
Priority of the metrics event.

◆ GetNumFailures()

int AWSMetrics::MetricsEvent::GetNumFailures ( ) const

Get the count of failures for sending the metrics event.

Returns
Count of failures for sending the metrics event.

◆ GetSizeInBytes()

size_t AWSMetrics::MetricsEvent::GetSizeInBytes ( ) const

Get the metrics event size serialized to json.

Returns
metrics event size in bytes.

◆ ReadFromJson()

bool AWSMetrics::MetricsEvent::ReadFromJson ( rapidjson::Value &  metricsObjVal)

Read from a JSON value to the metrics event.

Parameters
metricsObjValJSON value to read from.
Returns
Whether the metrics event is created successfully.

◆ SerializeToJson()

bool AWSMetrics::MetricsEvent::SerializeToJson ( AWSCore::JsonWriter &  writer) const

Serialize the metrics event to JSON for the sending requests.

Parameters
writerJSON writer for the serialization.
Returns
Whether the metrics event is serialized successfully.

◆ SetEventPriority()

void AWSMetrics::MetricsEvent::SetEventPriority ( int  priority)

Set the priority of a metrics event.

Parameters
priorityPriority to set.

◆ ValidateAgainstSchema()

bool AWSMetrics::MetricsEvent::ValidateAgainstSchema ( )

Validate the metrics event with the predefined JSON schema.

Returns
whether the metrics event match the JSON schema.

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