[][src]Struct metrics_cloudwatch::Builder

pub struct Builder { /* fields omitted */ }

Implementations

impl Builder[src]

pub fn cloudwatch_namespace(self, namespace: impl Into<String>) -> Self[src]

Sets the CloudWatch namespace for all metrics sent by this backend.

pub fn default_dimension(
    self,
    name: impl Into<String>,
    value: impl Into<String>
) -> Self
[src]

Adds a default dimension (name, value), that will be sent with each MetricDatum. This method can be called multiple times.

pub fn storage_resolution(self, resolution: Resolution) -> Self[src]

Sets storage resolution

pub fn send_interval_secs(self, secs: u64) -> Self[src]

Sets interval (seconds) at which batches of metrics will be sent to CloudWatch

pub fn region(self, region: Region) -> Self[src]

Sets the AWS Region to send metrics to

pub fn client_builder(
    self,
    client_builder: Box<dyn Fn(Region) -> Box<dyn CloudWatch + Send + Sync> + Send + Sync>
) -> Self
[src]

Sets a closure that can produce a CloudWatch client.

pub fn shutdown_signal(self, shutdown_signal: BoxFuture<'static, ()>) -> Self[src]

Sets a future that acts as a shutdown signal when it completes. Completion of this future will trigger a final flush of metrics to CloudWatch.

pub fn init_thread(self) -> Result<(), Error>[src]

Initializes the CloudWatch metrics backend and runs it in a new thread

pub async fn init_future(self) -> Result<(), Error>[src]

Initializes the CloudWatch metrics and returns a Future that must be polled

Trait Implementations

impl Debug for Builder[src]

impl Default for Builder[src]

Auto Trait Implementations

impl !RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl !UnwindSafe for Builder

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> Sealed<T> for T where
    T: ?Sized

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.