Struct coord::coord::prometheus::Scraper[][src]

pub struct Scraper {
    interval: Option<Duration>,
    retain_for: u64,
    registry: MetricsRegistry,
    metadata: HashMap<Row, u64>,
}
Expand description

Scrapes the prometheus registry when asked and produces a batch of metric data that can be inserted into the built-in mz_metrics table.

Fields

interval: Option<Duration>retain_for: u64registry: MetricsRegistrymetadata: HashMap<Row, u64>

Implementations

Constructs a new metrics scraper for the specified registry.

The logging configuration specifies what metrics to scrape and how long to retain them for. If the logging configuration is none, scraping is disabled.

Produces a stream that yields a Message::ScrapeMetrics at the desired scrape frequency.

If the scraper is disabled, this stream will yield no items.

Scrapes the metrics once, producing a batch of updates that should be inserted into the mz_metrics table.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more