Mozilla's Glean Telemetry SDK: The Machine that Goes 'Ping!'
Project description
Glean SDK
Documentation
All documentation is available online:
The Glean SDK Book
Overview
Refer to the documentation for using and developing the Glean SDK.
For an overview of Glean beyond just the SDK, see the section in the Firefox data docs.
The code in this repository is organized as follows:
- ./glean-core/ contains the source for the low-level Rust library.
- ./glean-core/ffi contains the mapping into a C FFI.
- ./glean-core/android contains the Kotlin bindings for use by Android applications.
- ./glean-core/ios contains the Swift bindings for use by iOS applications.
- ./glean-core/python contains Python bindings (currently under development).
Note: The Glean SDK requires at least Rust 1.34.2. Older versions are untested.
Contact
To contact us you can:
- Find us on the Mozilla Slack in #glean, on Mozilla IRC in #telemetry.
- To report issues or request changes, file a bug in Bugzilla in Data Platform & Tools :: Glean: SDK.
- Send an email to glean-team@mozilla.com.
- The Glean Core team is: :dexter, :janerik, :mdroettboom, :travis_, :gfritzsche, :chutten, :brizental.
Credits
The Glean logo artwork was contributed by Diana Ciufo. It's licensed under MPL.
License
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/
Unreleased changes
v23.0.1 (2020-01-08)
- Android:
- BUGFIX: The Glean Gradle plugin will now work if an app or library doesn't have a metrics.yaml or pings.yaml file.
- iOS:
- The released iOS binaries are now built with XCode 11.3.
v23.0.0 (2020-01-07)
- Python bindings:
- Support for events and UUID metrics was added.
- Android:
- The Glean Gradle Plugin correctly triggers docs and API updates when registry files change, without requiring them to be deleted.
parseISOTimeString
has been made 4x faster. This had an impact on Glean migration and initialization.- Metrics with
lifetime: application
are now cleared when the application is started, after startup Glean SDK pings are generated.
- All platforms:
- The public method
PingType.send()
(in all platforms) have been deprecated and renamed toPingType.submit()
. - Rename
deletion_request
ping todeletion-request
ping after glean_parser update
- The public method
v22.1.0 (2019-12-17)
- Add
InvalidOverflow
error toTimingDistribution
s (#583)
v22.0.0 (2019-12-05)
- Add option to defer ping lifetime metric persistence (#530)
- Add a crate for the nice control API (#542)
- Pending
deletion_request
pings are resent on start (#545)
v21.3.0 (2019-12-03)
- Timers are reset when disabled. That avoids recording timespans across disabled/enabled toggling (#495).
- Add a new flag to pings:
send_if_empty
(#528) - Upgrade
glean_parser
to v1.12.0 - Implement the deletion request ping in Glean (#526)
v21.2.0 (2019-11-21)
-
All platforms
-
The experiments API is no longer ignored before the Glean SDK initialized. Calls are recorded and played back once the Glean SDK is initialized.
-
String list items were being truncated to 20, rather than 50, bytes when using
.set()
(rather than.add()
). This has been corrected, but it may result in changes in the sent data if using string list items longer than 20 bytes.
-
v21.1.1 (2019-11-20)
-
Android:
- Use the
LifecycleEventObserver
interface, rather than theDefaultLifecycleObserver
interface, since the latter isn't compatible with old SDK targets.
- Use the
v21.1.0 (2019-11-20)
-
Android:
-
Two new metrics were added to investigate sending of metrics and baseline pings. See bug 1597980 for more information.
-
Glean's two lifecycle observers were refactored to avoid the use of reflection.
-
-
All platforms:
- Timespans will now not record an error if stopping after setting upload enabled to false.
v21.0.0 (2019-11-18)
-
Android:
-
The
GleanTimerId
can now be accessed in Java and is no longer atypealias
. -
Fixed a bug where the metrics ping was getting scheduled twice on startup.
-
-
All platforms
- Bumped
glean_parser
to version 1.11.0.
- Bumped
v20.2.0 (2019-11-11)
- In earlier 20.x.x releases, the version of glean-ffi was incorrectly built against the wrong version of glean-core.
v20.1.0 (2019-11-11)
-
The version of Glean is included in the Glean Gradle plugin.
-
When constructing a ping, events are now sorted by their timestamp. In practice, it rarely happens that event timestamps are unsorted to begin with, but this guards against a potential race condition and incorrect usage of the lower-level API.
v20.0.0 (2019-11-11)
-
Glean users should now use a Gradle plugin rather than a Gradle script. (#421) See integrating with the build system docs for more information.
-
In Kotlin, metrics that can record errors now have a new testing method,
testGetNumRecordedErrors
. (#401)
v19.1.0 (2019-10-29)
- Fixed a crash calling
start
on a timing distribution metric before Glean is initialized. Timings are always measured, but only recorded when upload is enabled (#400) - BUGFIX: When the Debug Activity is used to log pings, each ping is now logged only once (#407)
- New
invalid state
error, used in timespan recording (#230) - Add an Android crash instrumentation walk-through (#399)
- Fix crashing bug by avoiding assert-printing in LMDB (#422)
- Upgrade dependencies, including rkv (#416)
v19.0.0 (2019-10-22)
First stable release of Glean in Rust (aka glean-core). This is a major milestone in using a cross-platform implementation of Glean on the Android platform.
- Fix round-tripping of timezone offsets in dates (#392)
- Handle dynamic labels in coroutine tasks (#394)
v0.0.1-TESTING6 (2019-10-18)
- Ignore dynamically stored labels if Glean is not initialized (#374)
- Make sure ProGuard doesn't remove Glean classes from the app (#380)
- Keep track of pings in all modes (#378)
- Add
jnaTest
dependencies to theforUnitTest
JAR (#382)
v0.0.1-TESTING5 (2019-10-10)
- Upgrade to NDK r20 (#365)
v0.0.1-TESTING4 (2019-10-09)
- Take DST into account when converting a calendar into its items (#359)
- Include a macOS library in the
forUnitTests
builds (#358) - Keep track of all registered pings in test mode (#363)
v0.0.1-TESTING3 (2019-10-08)
- Allow configuration of Glean through the
GleanTestRule
- Bump
glean_parser
version to 1.9.2
v0.0.1-TESTING2 (2019-10-07)
- Include a Windows library in the
forUnitTests
builds
v0.0.1-TESTING1 (2019-10-02)
General
First testing release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for glean_sdk-23.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | badd3caa917912d8b12ade65e25f1b2d102fa6863ea94aa9fa115c6f988a2f02 |
|
MD5 | 43478fd44c8f252d1485318b919b4435 |
|
BLAKE2b-256 | ba0e5d669b1e9f044a54b671df6d98d677fa95e71cf1475ec2434362b5d23bb3 |
Hashes for glean_sdk-23.0.1-cp35-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b093fc95ce9d2333483e3905f2a33ff7dcc4b1884eb0c6cc05875e8691df5df5 |
|
MD5 | d2734fb058b746f3c0462a0762a740c2 |
|
BLAKE2b-256 | b2372acaf2a3989aa9834d0444fbf8d6b21057a7e24092ddc9ca6d06ec1b14d0 |