Struct metrics_util::layers::RouterBuilder[][src]

pub struct RouterBuilder { /* fields omitted */ }
Expand description

Routes metrics to specific target recorders.

Routes are defined as a prefix to check against the metric name, and a mask for the metric type. For example, a route with the pattern of “foo” would match “foo”, “or “foo.submetric”, but not “something.foo”. Likewise, a metric mask of “all” would apply this route to counters, gauges, and histograms, while any specific mask would only apply to the given metric kind.

A default route (recorder) is always present and used in the case that no specific route exists.

Implementations

Creates a RouterBuilder from a Recorder.

The given recorder is used as the default route when no other specific route exists.

Adds a route.

mask defines which metric kinds will match the given route, and pattern is a prefix string used to match against metric names.

If a matching route already exists, it will be overwritten.

Builds the configured Router.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.