logo
pub struct BasicControllerBuilder { /* private fields */ }
Available on crate feature metrics only.
Expand description

Options for configuring a BasicController

Implementations

Sets the Resource used for this controller.

Sets the exporter used for exporting metric data.

Note: Exporters such as Prometheus that pull data do not implement MetricsExporter. They will directly call collect and try_for_each.

Sets the interval between calls to collect a checkpoint.

When pulling metrics and not exporting, this is the minimum time between calls to collect.In a pull-only configuration, collection is performed on demand; set this to 0` to always recompute the export record set.

When exporting metrics, this must be > 0.

Default value is 10s.

Sets the timeout of the collect and subsequent observer instrument callbacks.

Default value is 10s. If zero or none, no collect timeout is applied.

Sets push controller timeout when a exporter is configured.

Default value is 10s. If zero, no export timeout is applied.

Creates a new basic controller.

Trait Implementations

Formats the value using the given formatter. Read more

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

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more

Attaches the current Context to this type, returning a WithContext wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.