Crate glean

source ·
Expand description

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 = ConfigurationBuilder::new(true, "/tmp/data", "org.mozilla.glean_core.example").build();
glean::initialize(cfg, ClientInfoMetrics::unknown());

let prototype_ping = PingType::new("prototype", true, true, true, true, vec!());

prototype_ping.submit(None);

Modules§

  • Handling the Glean upload logic.
  • The different metric types supported by the Glean SDK to handle data.
  • API definitions for the different metric types supported by the Glean SDK.

Structs§

Enums§

  • The possible error types for metric recording. Note: the cases in this enum must be kept in sync with the ones in the platform-specific code (e.g. ErrorType.kt) and with the metrics in the registry files.
  • Different kinds of histograms.
  • The supported metrics’ lifetimes.
  • Different resolutions supported by the memory related metric types (e.g. MemoryDistributionMetric).
  • Different resolutions supported by the time related metric types (e.g. DatetimeMetric).

Functions§

Type Aliases§

  • A specialized Result type for this crate’s operations.