[][src]Struct holochain_metrics::cloudwatch::CloudWatchLogger

pub struct CloudWatchLogger {
    pub client: CloudWatchLogsClient,
    pub log_group_name: Option<String>,
    pub log_stream_name: Option<String>,
    pub sequence_token: Option<String>,
    pub metrics_to_publish: Vec<Metric>,
}

A cloud watch logger instance with some configuration and state as needed by various service calls.

Fields

client: CloudWatchLogsClient

The underlying cloudwatch logs client

log_group_name: Option<String>log_stream_name: Option<String>sequence_token: Option<String>

Set automatically when publishing log metrics

metrics_to_publish: Vec<Metric>

Methods

impl CloudWatchLogger[src]

pub fn query(&self, query_args: &QueryArgs) -> Vec<Vec<ResultField>>[src]

Query the cloudwatch logger given a start and stop time interval. Produces a raw vector of result field rows (each as a vector). Use CloudWatchLogger::query_metrics or CloudWatchLogger::query_and_aggregate to produce numerical data from this raw data.

pub fn metrics_of_query<'a, I: IntoIterator<Item = Vec<ResultField>> + 'a>(
    query: I
) -> Box<dyn Iterator<Item = Metric> + 'a>
[src]

Converts raw result fields to in iterator over metric samples

pub fn query_metrics(
    &self,
    query_args: &QueryArgs
) -> Box<dyn Iterator<Item = Metric>>
[src]

Queries cloudwatch logs given a start and end time interval and produces all metric samples observed during the interval

pub fn query_and_aggregate(
    &self,
    query_args: &QueryArgs
) -> StatsByMetric<OnlineStats>
[src]

Queries cloudwatch logs given a start and end time interval and produces aggregate statistics of metrics from the results.

pub fn default_log_stream() -> String[src]

pub fn default_log_group() -> String[src]

pub fn default_start_time() -> i64[src]

pub fn default_assume_role_arn() -> String[src]

pub fn default_end_time() -> i64[src]

pub fn with_log_group<P: ProvideAwsCredentials + Sync + Send + 'static>(
    log_group_name: String,
    credentials_provider: P,
    region: &Region
) -> Self where
    P::Future: Send
[src]

pub fn with_region(region: &Region) -> Self[src]

pub fn ensure_log_group(&self)[src]

pub fn new<P: ProvideAwsCredentials + Sync + Send + 'static>(
    log_stream_name: Option<String>,
    log_group_name: Option<String>,
    credentials_provider: P,
    region: &Region
) -> Self where
    P::Future: Send
[src]

impl CloudWatchLogger[src]

pub fn get_log_stream_names<S: Into<String>>(
    &self,
    log_stream_name_prefix: S
) -> Box<dyn Iterator<Item = String>>
[src]

Trait Implementations

impl Clone for CloudWatchLogger[src]

impl Default for CloudWatchLogger[src]

impl Drop for CloudWatchLogger[src]

impl MetricPublisher for CloudWatchLogger[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,