AWS SDK for C++

AWS SDK for C++ Version 1.11.927

Loading...
Searching...
No Matches
smithy::components::tracing::TracingUtils Class Reference

#include <TracingUtils.h>

Classes

class  ScopedMetricTimer
 

Public Member Functions

 TracingUtils ()=default
 

Static Public Member Functions

template<typename T >
static T MakeCallWithTiming (std::function< T()> func, const Aws::String &metricName, const Meter &meter, Aws::Map< Aws::String, Aws::String > &&attributes, const Aws::String &description="")
 
static void MakeCallWithTiming (std::function< void(void)> func, Aws::String metricName, const Meter &meter, Aws::Map< Aws::String, Aws::String > &&attributes, Aws::String description="")
 
static void EmitCoreHttpMetrics (const Aws::Monitoring::HttpClientMetricsCollection &metrics, const Meter &meter, Aws::Map< Aws::String, Aws::String > &&attributes, Aws::String description="")
 
static std::pair< Aws::String, Aws::String > ConvertCoreMetricToSmithy (const Aws::String &name)
 

Static Public Attributes

static const char COUNT_METRIC_TYPE []
 
static const char MICROSECOND_METRIC_TYPE []
 
static const char BYTES_PER_SECOND_METRIC_TYPE []
 
static const char SMITHY_CLIENT_DURATION_METRIC []
 
static const char SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC []
 
static const char SMITHY_CLIENT_DESERIALIZATION_METRIC []
 
static const char SMITHY_CLIENT_SIGNING_METRIC []
 
static const char SMITHY_CLIENT_SERIALIZATION_METRIC []
 
static const char SMITHY_CLIENT_SERVICE_CALL_METRIC []
 
static const char SMITHY_CLIENT_SERVICE_BACKOFF_DELAY_METRIC []
 
static const char SMITHY_CLIENT_SERVICE_ATTEMPTS_METRIC []
 
static const char SMITHY_METHOD_AWS_VALUE []
 
static const char SMITHY_SERVICE_DIMENSION []
 
static const char SMITHY_METHOD_DIMENSION []
 
static const char SMITHY_SYSTEM_DIMENSION []
 
static const char SMITHY_METRICS_DNS_DURATION []
 
static const char SMITHY_METRICS_CONNECT_DURATION []
 
static const char SMITHY_METRICS_SSL_DURATION []
 
static const char SMITHY_METRICS_DOWNLOAD_SPEED_METRIC []
 
static const char SMITHY_METRICS_UPLOAD_SPEED_METRIC []
 
static const char SMITHY_METRICS_UNKNOWN_METRIC []
 

Detailed Description

A utility class for common tracing activities.

Definition at line 21 of file TracingUtils.h.

Constructor & Destructor Documentation

◆ TracingUtils()

smithy::components::tracing::TracingUtils::TracingUtils ( )
default

Member Function Documentation

◆ ConvertCoreMetricToSmithy()

static std::pair< Aws::String, Aws::String > smithy::components::tracing::TracingUtils::ConvertCoreMetricToSmithy ( const Aws::String & name)
inlinestatic

Converts the string Representation of a Core metric to a smithy metric.

Parameters
namethe metric name.
Returns
A tuple of metric name to measurement unit.

Definition at line 148 of file TracingUtils.h.

◆ EmitCoreHttpMetrics()

static void smithy::components::tracing::TracingUtils::EmitCoreHttpMetrics ( const Aws::Monitoring::HttpClientMetricsCollection & metrics,
const Meter & meter,
Aws::Map< Aws::String, Aws::String > && attributes,
Aws::String description = "" )
inlinestatic

Emits http metrics to a specified meter.

Parameters
metricsA http metrics collection that we will emit.
meterThe meter used for metrics emissions.
attributesThe attributes or dimensions associate with this measurement.
descriptionThe description of the measurement.

Definition at line 123 of file TracingUtils.h.

◆ MakeCallWithTiming() [1/2]

template<typename T >
static T smithy::components::tracing::TracingUtils::MakeCallWithTiming ( std::function< T()> func,
const Aws::String & metricName,
const Meter & meter,
Aws::Map< Aws::String, Aws::String > && attributes,
const Aws::String & description = "" )
inlinestatic

Will run a function and emit the duration of that function in millisecond timing to the meter provided as a Histogram metrics. Will return the result af the function.

Template Parameters
TThe type that is being returned from the function.
Parameters
funcA function that returns T.
metricNameThe name of the metric that is being captured by the function.
meterThe meter making the measurement.
attributesThe attributes or dimensions associate with this measurement.
descriptionThe description of the measurement.
Returns
the result of func.

Definition at line 82 of file TracingUtils.h.

◆ MakeCallWithTiming() [2/2]

static void smithy::components::tracing::TracingUtils::MakeCallWithTiming ( std::function< void(void)> func,
Aws::String metricName,
const Meter & meter,
Aws::Map< Aws::String, Aws::String > && attributes,
Aws::String description = "" )
inlinestatic

Will run a function and emit the duration of that function in millisecond timing to the meter provided as a Histogram metrics.

Parameters
funca function that does not return anything but will be measured.
metricNameThe name of the metric that is being captured by the function.
meterThe meter making the measurement.
attributesThe attributes or dimensions associate with this measurement.
descriptionThe description of the measurement.

Definition at line 104 of file TracingUtils.h.

Member Data Documentation

◆ BYTES_PER_SECOND_METRIC_TYPE

const char smithy::components::tracing::TracingUtils::BYTES_PER_SECOND_METRIC_TYPE[]
static

Definition at line 50 of file TracingUtils.h.

◆ COUNT_METRIC_TYPE

const char smithy::components::tracing::TracingUtils::COUNT_METRIC_TYPE[]
static

Definition at line 48 of file TracingUtils.h.

◆ MICROSECOND_METRIC_TYPE

const char smithy::components::tracing::TracingUtils::MICROSECOND_METRIC_TYPE[]
static

Definition at line 49 of file TracingUtils.h.

◆ SMITHY_CLIENT_DESERIALIZATION_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_DESERIALIZATION_METRIC[]
static

Definition at line 53 of file TracingUtils.h.

◆ SMITHY_CLIENT_DURATION_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_DURATION_METRIC[]
static

Definition at line 51 of file TracingUtils.h.

◆ SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_ENDPOINT_RESOLUTION_METRIC[]
static

Definition at line 52 of file TracingUtils.h.

◆ SMITHY_CLIENT_SERIALIZATION_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_SERIALIZATION_METRIC[]
static

Definition at line 55 of file TracingUtils.h.

◆ SMITHY_CLIENT_SERVICE_ATTEMPTS_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_SERVICE_ATTEMPTS_METRIC[]
static

Definition at line 58 of file TracingUtils.h.

◆ SMITHY_CLIENT_SERVICE_BACKOFF_DELAY_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_SERVICE_BACKOFF_DELAY_METRIC[]
static

Definition at line 57 of file TracingUtils.h.

◆ SMITHY_CLIENT_SERVICE_CALL_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_SERVICE_CALL_METRIC[]
static

Definition at line 56 of file TracingUtils.h.

◆ SMITHY_CLIENT_SIGNING_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_CLIENT_SIGNING_METRIC[]
static

Definition at line 54 of file TracingUtils.h.

◆ SMITHY_METHOD_AWS_VALUE

const char smithy::components::tracing::TracingUtils::SMITHY_METHOD_AWS_VALUE[]
static

Definition at line 59 of file TracingUtils.h.

◆ SMITHY_METHOD_DIMENSION

const char smithy::components::tracing::TracingUtils::SMITHY_METHOD_DIMENSION[]
static

Definition at line 61 of file TracingUtils.h.

◆ SMITHY_METRICS_CONNECT_DURATION

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_CONNECT_DURATION[]
static

Definition at line 64 of file TracingUtils.h.

◆ SMITHY_METRICS_DNS_DURATION

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_DNS_DURATION[]
static

Definition at line 63 of file TracingUtils.h.

◆ SMITHY_METRICS_DOWNLOAD_SPEED_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_DOWNLOAD_SPEED_METRIC[]
static

Definition at line 66 of file TracingUtils.h.

◆ SMITHY_METRICS_SSL_DURATION

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_SSL_DURATION[]
static

Definition at line 65 of file TracingUtils.h.

◆ SMITHY_METRICS_UNKNOWN_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_UNKNOWN_METRIC[]
static

Definition at line 68 of file TracingUtils.h.

◆ SMITHY_METRICS_UPLOAD_SPEED_METRIC

const char smithy::components::tracing::TracingUtils::SMITHY_METRICS_UPLOAD_SPEED_METRIC[]
static

Definition at line 67 of file TracingUtils.h.

◆ SMITHY_SERVICE_DIMENSION

const char smithy::components::tracing::TracingUtils::SMITHY_SERVICE_DIMENSION[]
static

Definition at line 60 of file TracingUtils.h.

◆ SMITHY_SYSTEM_DIMENSION

const char smithy::components::tracing::TracingUtils::SMITHY_SYSTEM_DIMENSION[]
static

Definition at line 62 of file TracingUtils.h.


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