[−][src]Crate glean_preview
Glean is a modern approach for recording and sending Telemetry data.
It's in use at Mozilla.
All documentation can be found online:
The Glean SDK Book
Example
Initialize Glean, register a ping and then send it.
let cfg = Configuration { data_path: "/tmp/data".into(), application_id: "org.mozilla.glean_core.example".into(), upload_enabled: true, max_events: None, delay_ping_lifetime_io: false, channel: None, }; glean_preview::initialize(cfg, ClientInfoMetrics::unknown())?; let prototype_ping = PingType::new("prototype", true, true); glean_preview::register_ping_type(&prototype_ping); prototype_ping.submit();
Modules
metrics | The different metric types supported by the Glean SDK to handle data. |
Structs
ClientInfoMetrics | Metrics included in every ping as |
CommonMetricData | The common set of data shared across all different metric types. |
Configuration | The Glean configuration. |
Error | A specialized |
Glean | The object holding meta information about a Glean instance. |
Enums
Lifetime | The supported metrics' lifetimes. |
Functions
initialize | Create and initialize a new Glean object. |
is_upload_enabled | Determine whether upload is enabled. |
register_ping_type | Register a new |
set_upload_enabled | Set whether upload is enabled or not. |
submit_ping | Collect and submit a ping for eventual uploading. |
submit_ping_by_name | Collect and submit a ping for eventual uploading by name. |
submit_pings_by_name | Collect and submit multiple pings by name for eventual uploading. |
Type Definitions
Result | A specialized |