CDI SDK
SDK for transporting chunks of data reliably and with low latency using a polled mode network driver.
Loading...
Searching...
No Matches
cloudwatch_sdk_metrics.cpp File Reference

This file contains internal definitions and implementation used with the SDK that is not part of the API. It is used as a C interface to the CloudWatch SDK, which uses a C++ interface. More...

#include "configuration.h"
#include "cloudwatch_sdk_metrics.h"
#include <aws/core/Aws.h>
#include <aws/core/internal/AWSHttpResourceClient.h>
#include <aws/core/utils/logging/FormattedLogSystem.h>
#include <aws/core/utils/UUID.h>
#include <aws/monitoring/CloudWatchClient.h>
#include <aws/monitoring/model/PutMetricDataRequest.h>
#include <aws/cdi/CDIMonitoringClient.h>
#include <aws/cdi/model/PutMetricGroupsRequest.h>
#include "cdi_logger_api.h"
#include <regex>

Data Structures

class  AwsSdkState
 
class  CdiCloudWatchLogging
 Class used to redirect AWS SDK logging to CDI logging methods. More...
 
class  MetricsClass
 Abstract base class used to interface C functions to the C++ AWS-SDK for CloudWatch metrics and for the CDI metrics gathering service. More...
 
class  UserMetrics
 
class  MetricsGatherer
 

Macros

#define AWS_CREDENTIAL_ERROR_STRING   "Failed to find credential process's profile: default"
 Filter out the following string from ERROR status, convert to WARNING status.
 

Functions

CdiReturnStatus CloudWatchSdkMetricsCreate (const CdiCloudWatchConfigData *config_ptr, CloudWatchSdkMetricsHandle *ret_handle_ptr)
 
CdiReturnStatus CloudWatchSdkMetricsDestroy (CloudWatchSdkMetricsHandle handle)
 
CdiReturnStatus MetricsGathererCreate (const MetricsGathererConfigData *config_ptr, CloudWatchSdkMetricsHandle *ret_handle_ptr)
 
CdiReturnStatus MetricsGathererDestroy (CloudWatchSdkMetricsHandle handle)
 
CdiReturnStatus MetricsSend (CloudWatchSdkMetricsHandle handle, const CloudWatchTransferStats *transfer_stats_ptr)
 

Detailed Description

This file contains internal definitions and implementation used with the SDK that is not part of the API. It is used as a C interface to the CloudWatch SDK, which uses a C++ interface.

Function Documentation

◆ CloudWatchSdkMetricsCreate()

CdiReturnStatus CloudWatchSdkMetricsCreate ( const CdiCloudWatchConfigData * config_ptr,
CloudWatchSdkMetricsHandle * ret_handle_ptr )

Create an instance of CloudWatch SDK metrics and open a connection.

Parameters
config_ptrPointer to configuration data.
ret_handle_ptrAddress where to write returned CloudWatch wrapper handle.
Returns
A value from the CdiReturnStatus enumeration.

◆ CloudWatchSdkMetricsDestroy()

CdiReturnStatus CloudWatchSdkMetricsDestroy ( CloudWatchSdkMetricsHandle handle)

Free all resources related to the specified CloudWatch SDK metrics instance.

Parameters
handleHandle of CloudWatch SDK metrics instance.
Returns
A value from the CdiReturnStatus enumeration.

◆ MetricsGathererCreate()

CdiReturnStatus MetricsGathererCreate ( const MetricsGathererConfigData * config_ptr,
CloudWatchSdkMetricsHandle * ret_handle_ptr )

Create a CDI metrics gathering system client and open a connection to the service.

Parameters
config_ptrPointer to configuration data.
ret_handle_ptrAddress where to write returned handle.
Returns
A value from the CdiReturnStatus enumeration.

◆ MetricsGathererDestroy()

CdiReturnStatus MetricsGathererDestroy ( CloudWatchSdkMetricsHandle handle)

Free all resources related to the specified CloudWatch SDK metrics instance.

Parameters
handleHandle of CDI metrics gathering service client instance.
Returns
A value from the CdiReturnStatus enumeration.

◆ MetricsSend()

CdiReturnStatus MetricsSend ( CloudWatchSdkMetricsHandle handle,
const CloudWatchTransferStats * transfer_stats_ptr )

Send transfer statistics using the specified pubishing client instance.

Parameters
handleThe handle of the CloudWatch SDK metrics instance to send statistics to.
transfer_stats_ptrPointer to stats to send.
Returns
A value from the CdiReturnStatus enumeration.