[−][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, }; glean_preview::initialize(cfg)?; let prototype_ping = PingType::new("prototype", true, true); glean_preview::register_ping_type(&prototype_ping); prototype_ping.send();
Modules
metrics | The different metric types supported by the Glean SDK to handle data. |
Structs
Configuration | The Glean configuration. |
Error | A specialized |
Glean | The object holding meta information about a Glean instance. |
Functions
initialize | Create and initialize a new Glean object. |
is_upload_enabled | Determine whether upload is enabled. |
register_ping_type | Register a new |
send_ping | Send a ping. |
send_ping_by_name | Send a ping by name. |
send_pings_by_name | Send multiple pings by name |
set_upload_enabled | Set whether upload is enabled or not. |
Type Definitions
Result | A specialized |