AWS SDK for C++  1.9.159
AWS SDK for C++
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Aws::Monitoring::DefaultMonitoring Class Reference

#include <DefaultMonitoring.h>

+ Inheritance diagram for Aws::Monitoring::DefaultMonitoring:

Public Member Functions

 DefaultMonitoring (const Aws::String &clientId, const Aws::String &host, unsigned short port)
 Construct a default monitoring instance. More...
 
void * OnRequestStarted (const Aws::String &serviceName, const Aws::String &requestName, const std::shared_ptr< const Aws::Http::HttpRequest > &request) const override
 This function lets you do preparation work when a http attempt(request) starts. It returns a pointer to an implementation defined context which will be passed down with the other facilities that completes the request's lifetime. This context can be used to track the lifetime of the request and record metrics specific to this particular request. You are responsible for deleteing the context during your OnFinish call. More...
 
void OnRequestSucceeded (const Aws::String &serviceName, const Aws::String &requestName, const std::shared_ptr< const Aws::Http::HttpRequest > &request, const Aws::Client::HttpResponseOutcome &outcome, const CoreMetricsCollection &metricsFromCore, void *context) const override
 Once a Http attempt finished and received "Succeeded" response, this function will be called. More...
 
void OnRequestFailed (const Aws::String &serviceName, const Aws::String &requestName, const std::shared_ptr< const Aws::Http::HttpRequest > &request, const Aws::Client::HttpResponseOutcome &outcome, const CoreMetricsCollection &metricsFromCore, void *context) const override
 Once a Http request finished and received "Failed" response, this function will be called. More...
 
void OnRequestRetry (const Aws::String &serviceName, const Aws::String &requestName, const std::shared_ptr< const Aws::Http::HttpRequest > &request, void *context) const override
 Once an API call retried the attempt and send the request again, this function will be called. More...
 
void OnFinish (const Aws::String &serviceName, const Aws::String &requestName, const std::shared_ptr< const Aws::Http::HttpRequest > &request, void *context) const override
 This function will always be called by the SDK to signal the implementer that this request is done. The implementer can safely delete the context. More...
 
- Public Member Functions inherited from Aws::Monitoring::MonitoringInterface
virtual ~MonitoringInterface ()=default
 

Static Public Member Functions

static int GetVersion ()
 

Static Public Attributes

static const int DEFAULT_MONITORING_VERSION
 
static const char DEFAULT_CSM_CONFIG_ENABLED []
 
static const char DEFAULT_CSM_CONFIG_CLIENT_ID []
 
static const char DEFAULT_CSM_CONFIG_HOST []
 
static const char DEFAULT_CSM_CONFIG_PORT []
 
static const char DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED []
 
static const char DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID []
 
static const char DEFAULT_CSM_ENVIRONMENT_VAR_HOST []
 
static const char DEFAULT_CSM_ENVIRONMENT_VAR_PORT []
 

Detailed Description

Default monitoring implementation definition

Definition at line 19 of file DefaultMonitoring.h.

Constructor & Destructor Documentation

◆ DefaultMonitoring()

Aws::Monitoring::DefaultMonitoring::DefaultMonitoring ( const Aws::String clientId,
const Aws::String host,
unsigned short  port 
)

Construct a default monitoring instance.

Parameters
clientId,usedto identify the application
host,eitherthe host name or the host ip address (could be ipv4 or ipv6). Note that "localhost" will be treated as host name and address look up will be performed.
port,usedto send collected metric to a local agent listen on this port.

Member Function Documentation

◆ GetVersion()

static int Aws::Monitoring::DefaultMonitoring::GetVersion ( )
inlinestatic

Definition at line 57 of file DefaultMonitoring.h.

◆ OnFinish()

void Aws::Monitoring::DefaultMonitoring::OnFinish ( const Aws::String serviceName,
const Aws::String requestName,
const std::shared_ptr< const Aws::Http::HttpRequest > &  request,
void *  context 
) const
overridevirtual

This function will always be called by the SDK to signal the implementer that this request is done. The implementer can safely delete the context.

Parameters
serviceName,theservice client who initiate this http attempt. like "s3", "ec2", etc.
requestName,theoperation or API name of this http attempt, like "GetObject" in s3.
request,theactual Http Request.
contextparameter pointed to the same place returned by OnRequestStarted() function.
Returns
void.

Implements Aws::Monitoring::MonitoringInterface.

◆ OnRequestFailed()

void Aws::Monitoring::DefaultMonitoring::OnRequestFailed ( const Aws::String serviceName,
const Aws::String requestName,
const std::shared_ptr< const Aws::Http::HttpRequest > &  request,
const Aws::Client::HttpResponseOutcome outcome,
const CoreMetricsCollection metricsFromCore,
void *  context 
) const
overridevirtual

Once a Http request finished and received "Failed" response, this function will be called.

Parameters
serviceName,theservice client who initiate this http attempt. like "s3", "ec2", etc.
requestName,theoperation or API name of this http attempt, like "GetObject" in s3.
request,theactual Http Request.
outcome,theoutcome of the http attempt, you can access httpResponse and original httpRequest from it.
metricsFromCore,metricscollected from core, such as detailed latencies during http connection.
contextparameter pointed to the same place returned by OnRequestStarted() function.
Returns
void.

Implements Aws::Monitoring::MonitoringInterface.

◆ OnRequestRetry()

void Aws::Monitoring::DefaultMonitoring::OnRequestRetry ( const Aws::String serviceName,
const Aws::String requestName,
const std::shared_ptr< const Aws::Http::HttpRequest > &  request,
void *  context 
) const
overridevirtual

Once an API call retried the attempt and send the request again, this function will be called.

Parameters
serviceName,theservice client who initiate this http attempt. like "s3", "ec2", etc.
requestName,theoperation or API name of this http attempt, like "GetObject" in s3.
request,theactual Http Request.
contextparameter pointed to the same place returned by OnRequestStarted() function.
Returns
void.

Implements Aws::Monitoring::MonitoringInterface.

◆ OnRequestStarted()

void* Aws::Monitoring::DefaultMonitoring::OnRequestStarted ( const Aws::String serviceName,
const Aws::String requestName,
const std::shared_ptr< const Aws::Http::HttpRequest > &  request 
) const
overridevirtual

This function lets you do preparation work when a http attempt(request) starts. It returns a pointer to an implementation defined context which will be passed down with the other facilities that completes the request's lifetime. This context can be used to track the lifetime of the request and record metrics specific to this particular request. You are responsible for deleteing the context during your OnFinish call.

Parameters
serviceName,theservice client who initiates this http attempt. like "s3", "ec2", etc.
requestName,theoperation or API name of this http attempt, like "GetObject" in s3.
request,theactual Http Request.
Returns
implementation depends memory address of context.

Implements Aws::Monitoring::MonitoringInterface.

◆ OnRequestSucceeded()

void Aws::Monitoring::DefaultMonitoring::OnRequestSucceeded ( const Aws::String serviceName,
const Aws::String requestName,
const std::shared_ptr< const Aws::Http::HttpRequest > &  request,
const Aws::Client::HttpResponseOutcome outcome,
const CoreMetricsCollection metricsFromCore,
void *  context 
) const
overridevirtual

Once a Http attempt finished and received "Succeeded" response, this function will be called.

Parameters
serviceName,theservice client who initiate this http attempt. like "s3", "ec2", etc.
requestName,theoperation or API name of this http attempt, like "GetObject" in s3.
request,theactual Http Request.
outcome,theoutcome of the http attempt, you can access httpResponse and original httpRequest from it.
metricsFromCore,metricscollected from core, such as detailed latencies during http connection.
contextparameter pointed to the same place returned by OnRequestStarted() function.
Returns
void.

Implements Aws::Monitoring::MonitoringInterface.

Member Data Documentation

◆ DEFAULT_CSM_CONFIG_CLIENT_ID

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_CONFIG_CLIENT_ID[]
static

Definition at line 24 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_CONFIG_ENABLED

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_CONFIG_ENABLED[]
static

Definition at line 23 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_CONFIG_HOST

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_CONFIG_HOST[]
static

Definition at line 25 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_CONFIG_PORT

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_CONFIG_PORT[]
static

Definition at line 26 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_CLIENT_ID[]
static

Definition at line 28 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_ENABLED[]
static

Definition at line 27 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_ENVIRONMENT_VAR_HOST

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_HOST[]
static

Definition at line 29 of file DefaultMonitoring.h.

◆ DEFAULT_CSM_ENVIRONMENT_VAR_PORT

const char Aws::Monitoring::DefaultMonitoring::DEFAULT_CSM_ENVIRONMENT_VAR_PORT[]
static

Definition at line 30 of file DefaultMonitoring.h.

◆ DEFAULT_MONITORING_VERSION

const int Aws::Monitoring::DefaultMonitoring::DEFAULT_MONITORING_VERSION
static

Definition at line 22 of file DefaultMonitoring.h.


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