Using the C++ API with the AWS Metrics Gem

The AWS Metrics Gem provides a C++ API for submitting metrics and handling notifications using the O3DE EBus. For more information about using the EBus system, refer to the EBus documentation.

Using the AWSMetricsRequestBus

Sample code for calling the APIs in C++.

// Submit a metrics event and buffer it for sending in batch.
bool result = false;
AWSMetricsRequestBus::BroadcastResult(result, &AWSMetricsRequests::SubmitMetrics, metricsAttributes, 0, "C++", true);
 
// Or, submit a metrics event directly without using a buffer.
bool result = false;
AWSMetricsRequestBus::BroadcastResult(result, &AWSMetricsRequests::SubmitMetrics, metricsAttributes, 0, "C++", false);
 
// Flush all the buffered metrics events.
AWSMetricsRequestBus::Broadcast(&AWSMetricsRequests::FlushMetrics);

Using the AWSMetricsNotificationBus

Use standard EBus notification handlers for capturing OnSendMetricsSuccess and OnSendMetricsFailure notifications in C++.

C++ API Reference

See the O3DE API Reference Guide for a complete reference to the AWS Metrics C++ API .


Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.