Rust

database

Module

The Database adapter: every metric in one collection (usage) of a utopia-database database, events and gauges told apart by a type attribute.

Contents

use utopia_usage::adapter::database::Database;
Rust
pub struct Database

Usage metrics in a utopia-database collection. The adapter owns the database's tenant: every call sets it (a numeric tenant), none restores it, so give it a database dedicated to usage.

Time series are not implemented (every metric reads as empty), and the daily methods read the collection itself.

Also implements Debug.
Rust
pub const COLLECTION: &str = "usage"

The collection metrics are stored in.