[][src]Struct dipstick::Proxy

pub struct Proxy { /* fields omitted */ }

A dynamic proxy for app and lib metrics. Decouples metrics definition from backend configuration. Allows defining metrics before a concrete type is configured. Allows replacing metrics backend on the fly at runtime.

Methods

impl Proxy[src]

pub fn new() -> Self[src]

Create a new "private" metric proxy root. This is usually not what you want. Since this proxy will not be part of the standard proxy tree, it will need to be configured independently and since downstream code may not know about its existence this may never happen and metrics will not be proxyed anywhere. If you want to use the standard proxy tree, use #metric_proxy() instead.

pub fn set_target<T: InputScope + Send + Sync + 'static>(&self, target: T)[src]

Deprecated since 0.7.2:

Use target()

Replace target for this proxy and its children.

pub fn target<T: InputScope + Send + Sync + 'static>(&self, target: T)[src]

Replace target for this proxy and its children.

pub fn unset_target(&self)[src]

Replace target for this proxy and its children.

pub fn set_default_target<T: InputScope + Send + Sync + 'static>(target: T)[src]

Deprecated since 0.7.2:

Use default_target()

Install a new default target for all proxies.

pub fn default_target<T: InputScope + Send + Sync + 'static>(target: T)[src]

Install a new default target for all proxies.

pub fn unset_default_target(&self)[src]

Revert to initial state any installed default target for all proxies.

Trait Implementations

impl InputScope for Proxy[src]

fn new_metric(&self, name: MetricName, kind: InputKind) -> InputMetric[src]

Lookup or create a proxy stub for the requested metric.

fn counter(&self, name: &str) -> Counter[src]

Define a Counter.

fn marker(&self, name: &str) -> Marker[src]

Define a Marker.

fn timer(&self, name: &str) -> Timer[src]

Define a Timer.

fn gauge(&self, name: &str) -> Gauge[src]

Define a Gauge.

fn level(&self, name: &str) -> Level[src]

Define a Level.

impl Flush for Proxy[src]

impl Default for Proxy[src]

fn default() -> Self[src]

Return the default root metric proxy.

impl<S: AsRef<str>> From<S> for Proxy[src]

impl Clone for Proxy[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Proxy[src]

Auto Trait Implementations

impl Send for Proxy

impl Unpin for Proxy

impl Sync for Proxy

impl !UnwindSafe for Proxy

impl !RefUnwindSafe for Proxy

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T