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.
Note: The Glean SDK requires at least Rust 1.53.0. Older versions are untested.
Contact
To contact us you can:
- Find us in the #glean channel on chat.mozilla.org.
- 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
v42.3.0 (2021-12-07)
- Rust
- iOS
- Python
- Don't let environment affect subprocess module search path (#1542)
v42.2.0 (2021-11-03)
- General
- Updated
glean_parserversion to 4.3.1 (#1852)
- Updated
- Android
- Automatic detection of
tags.yamlfiles (#1852)
- Automatic detection of
v42.1.0 (2021-10-18)
- Rust
- Backwards-compatible API Change: Make experiment test APIs public. (#1834)
v42.0.1 (2021-10-11)
- General
- BUGFIX: Avoid a crash when accessing labeled metrics by caching created objects (#1823).
- Python
- Glean now officially supports Python 3.10 (#1818)
v42.0.0 (2021-10-06)
- Android
- Updated to Gradle 7, Android Gradle Plugin 7 and Rust Android Plugin 0.9 as well as building with Java 11 (#1801)
- iOS
- Rust
v41.1.1 (2021-09-29)
- Android
- BUGFIX: Limit logging to Glean crates (#1808)
v41.1.0 (2021-09-16)
- Rust
v41.0.0 (2021-09-13)
- General
- Android
Glean.initializenow requires abuildInfoparameter to pass in build time version information. A suitable instance is generated byglean_parserin${PACKAGE_ROOT}.GleanMetrics.GleanBuildInfo.buildInfo. Support for not passing in abuildInfoobject has been removed. (#1752)
v40.2.0 (2021-09-08)
- General
- Updated
glean_parserversion to 4.0.0
- Updated
- Android
- Add support for the URL metric type (#1778)
- Rust
- Add support for the URL metric type (#1778)
- Python
- Add support for the URL metric type (#1778)
v40.1.1 (2021-09-02)
- iOS
v40.1.0 (2021-08-25)
- Android
- Updated to Kotlin 1.5, Android Gradle Plugin 4.2.2 and Gradle 6.7.1 (#1747)
- The
glean-gradle-pluginnow forces a compile failure when multiple Glean versions are detected in the build (#1756) - The
glean-gradle-plugindoes not enable aglean-nativecapability on GeckoView anymore. That will be done by GeckoView directly (#1759)
v40.0.0 (2021-07-28)
- Android
-
Breaking Change: Split the Glean Kotlin SDK into two packages:
gleanandglean-native(#1595). Consumers will need to switch toorg.mozilla.telemetry:glean-native-forUnitTests. Old code inbuild.gradle:testImplementation "org.mozilla.telemetry:glean-forUnitTests:${project.ext.glean_version}"New code in
build.gradle:testImplementation "org.mozilla.telemetry:glean-native-forUnitTests:${project.ext.glean_version}" -
The
glean-gradle-pluginnow automatically excludes theglean-nativedependency ifgeckoview-omniis also part of the build. Glean native functionality will be provided by thegeckoview-omnipackage.
-
- Rust
- The
glean-ffiis no longer compiled as acdylib. Other language SDKs consumeglean-bundleinstead as acdylib. This doesn't affect consumers.
- The
v39.1.0 (2021-07-26)
- General
- Updated
glean_parserversion to 3.6.0 - Allow Custom Distribution metric type on all platforms (#1679)
- Updated
v39.0.4 (2021-07-26)
- General
- Extend
invalid_timezone_offsetmetric until the end of the year (#1697)
- Extend
v39.0.3 (2021-06-09)
- Android
- Unbreak Event#record API by accepting
nullon the deprecated API. The previous 39.0.0 release introduced the new API, but accidentally broke certain callers that just forward arguments. This restores passingnull(or nothing) when using the old API. It remains deprecated.
- Unbreak Event#record API by accepting
v39.0.2 (2021-06-07)
v39.0.1 (2021-06-04)
- iOS
- Build and release Glean as an xcframework (#1663) This will now also auto-update the Glean package at https://github.com/mozilla/glean-swift.
v39.0.0 (2021-05-31)
- General
- Rust
-
Breaking Change: Allow event extras to be passed as an object. This replaces the old
HashMap-based API. Values default tostring. See the event documentation for details. (#1603) Old code:let mut extra = HashMap::new(); extra.insert(SomeExtra::Key1, "1".into()); extra.insert(SomeExtra::Key2, "2".into()); metric.record(extra);New code:
let extra = SomeExtra { key1: Some("1".into()), key2: Some("2".into()), }; metric.record(extra);
-
- Android
- Deprecation: The old event recording API is replaced by a new one, accepting a typed object (#1603). See the event documentation for details.
- Skip build info generation for libraries (#1654)
- Python
- Deprecation: The old event recording API is replaced by a new one, accepting a typed object (#1603). See the event documentation for details.
- Swift
- Deprecation: The old event recording API is replaced by a new one, accepting a typed object (#1603). See the event documentation for details.
v38.0.1 (2021-05-17)
- General
- BUGFIX: Invert the lock order in glean-core's metrics ping scheduler (#1637)
v38.0.0 (2021-05-12)
- General
- Update documentation to recommend using Glean Dictionary instead of metrics.md (#1604)
- Rust
- Breaking Change: Don't return a result from
submit_ping. The boolean return value indicates whether a ping was submitted (#1613) - Breaking Change: Glean now schedules "metrics" pings, accepting a new Configuration parameter. (#1599)
- Dispatch setting the source tag to avoid a potential crash (#1614)
- Testing mode will wait for init & upload tasks to finish (#1628)
- Breaking Change: Don't return a result from
- Android
v37.0.0 (2021-04-30)
- General
- Breaking Change: "deletion-request" pings now include the reason upload was disabled:
at_init(Glean detected a change between runs) orset_upload_enabled(Glean was told of a change as it happened). (#1593). - Attempt to upload a ping even in the face of IO Errors (#1576).
- Implement an additional check to avoid crash due to faulty timezone offset (#1581)
- This now records a new metric
glean.time.invalid_timezone_offset, counting how often we failed to get a valid timezone offset.
- This now records a new metric
- Use proper paths throughout to hopefully handle non-UTF-8 paths more gracefully (#1596)
- Updated
glean_parserversion to 3.2.0 (#1609)
- Breaking Change: "deletion-request" pings now include the reason upload was disabled:
- iOS
- Code generator: Ensure at least pip 20.3 is available in iOS build (#1590)
v36.0.1 (2021-04-09)
- RLB
- Android
- BUGFIX:
TimespanMetricType.measureandTimingDistributionMetricType.measurewon't get inlined anymore (#1560). This avoids a potential bug where areturnused inside the closure would end up not measuring the time. Usereturn@measure <val>for early returns.
- BUGFIX:
- Python
- The Glean Python bindings now use rkv's safe mode backend. This should avoid intermittent segfaults in the LMDB backend.
v36.0.0 (2021-03-16)
- General
- Introduce a new API
Ping#test_before_next_submitto run a callback right before a custom ping is submitted (#1507).- The new API exists for all language bindings (Kotlin, Swift, Rust, Python).
- Updated
glean_parserversion to 2.5.0 - Change the
fmt-andlint-make commands for consistency (#1526) - The Glean SDK can now produce testing coverage reports for your metrics (#1482).
- Introduce a new API
- Python
- RLB
- Added
ratemetric type (#1516). - Set
internal_metrics::os_versionfor MacOS, Windows and Linux (#1538) - Expose a function
get_timestamp_msto get a timestamp from a monotonic clock on all supported operating systems, to be used for event timestamps (#1546). - Expose a function to record events with an externally provided timestamp.
- Added
- iOS
- Breaking Change: Event timestamps are now correctly recorded in milliseconds (#1546).
- Since the first release event timestamps were erroneously recorded with nanosecond precision (#1549). This is now fixed and event timestamps are in milliseconds. This is equivalent to how it works in all other language bindings.
- Breaking Change: Event timestamps are now correctly recorded in milliseconds (#1546).
v35.0.0 (2021-02-22)
- Android
Glean.initializecan now take abuildInfoparameter to pass in build time version information, and avoid calling out to the Android package manager at runtime. A suitable instance is generated byglean_parserin${PACKAGE_ROOT}.GleanMetrics.GleanBuildInfo.buildInfo(#1495). Not passing in abuildInfoobject is still supported, but is deprecated.- The
testGetValueAPIs now include a message on theNullPointerExceptionthrown when the value is missing. - Breaking change:
LEGACY_TAG_PINGSis removed fromGleanDebugActivity(#1510)
- RLB
- Breaking change:
Configuration.data_pathis now astd::path::PathBuf(#1493).
- Breaking change:
v34.1.0 (2021-02-04)
- General
- A new metric
glean.validation.pings_submittedtracks the number of pings sent. It is included in both themetricsandbaselinepings.
- A new metric
- iOS
- Python
- RLB
- BUGFIX: baseline pings with reason
dirty_startupare no longer sent if Glean did shutdown cleanly (#1483).
- BUGFIX: baseline pings with reason
v34.0.0 (2021-01-29)
- General
- Other bindings detect when RLB is used and try to flush the RLB dispatcher to unblock the Rust API (#1442).
- This is detected automatically, no changes needed for consuming code.
- Add support for the client activity API (#1455). This API is either automatically used or exposed by the language bindings.
- Rename the reason
backgroundtoinactivefor both thebaselineandeventsping. Rename the reasonforegroundtoactivefor thebaselineping.
- Other bindings detect when RLB is used and try to flush the RLB dispatcher to unblock the Rust API (#1442).
- RLB
- When the pre-init task queue overruns, this is now recorded in the metric
glean.error.preinit_tasks_overflow(#1438). - Expose the client activity API (#1455).
- Send the
baselineping with reasondirty_startup, if needed, at startup. - Expose all required types directly (#1452).
- Rust consumers will not need to depend on
glean-coreanymore.
- Rust consumers will not need to depend on
- When the pre-init task queue overruns, this is now recorded in the metric
- Android
- iOS
- Use the client activity API (#1465).
Note: this now introduces a baseline ping with reason
activeon startup.
- Use the client activity API (#1465).
Note: this now introduces a baseline ping with reason
v33.10.3 (2021-01-18)
- Rust
- Upgrade rkv to 0.17 (#1434)
v33.10.2 (2021-01-15)
- General:
- A new metric
glean.error.iohas been added, counting the times an IO error happens when writing a pending ping to disk (#1428)
- A new metric
- Android
- A new metric
glean.validation.foreground_countwas added to the metrics ping (#1418).
- A new metric
- Rust
v33.10.1 (2021-01-06)
No functional changes. v33.10.0 failed to generated iOS artifacts due to broken tests (#1421).
v33.10.0 (2021-01-06)
- General
- A new metric
glean.validation.first_run_hour, analogous to the existingfirst_run_datebut with hour resolution, has been added. Only clients running the app for the first time after this change will report this metric (#1403).
- A new metric
- Rust
- BUGFIX: Don't require mutable references in RLB traits (#1417).
- Python
- Building the Python package from source now works on musl-based Linux distributions, such as Alpine Linux (#1416).
v33.9.1 (2020-12-17)
- Rust
v33.9.0 (2020-12-15)
- Rust
v33.8.0 (2020-12-10)
- Rust
- Introduce the Memory Distribution metric type in the RLB. (#1376).
- Shut down Glean in tests before resetting to make sure they don't mistakenly init Glean twice in parallel (#1375).
- BUGFIX: Fixing 2
lock-order-inversionbugs found by TSan (#1378).- TSan runs on mozilla-central tests, which found two (potential) bugs where 2 different locks were acquired in opposite order in different code paths, which could lead to deadlocks in multi-threaded code. As RLB uses multiple threads (e.g. for init and the dispatcher) by default, this can easily become an actual issue.
- Python
- All log messages from the Glean SDK are now on the
gleanlogger, obtainable throughlogging.getLogger("glean"). (Prior to this, each module had its own logger, for exampleglean.net.ping_upload_worker).
- All log messages from the Glean SDK are now on the
v33.7.0 (2020-12-07)
- Rust
- Python
v33.6.0 (2020-12-02)
- Rust
- Python
v33.5.0 (2020-12-01)
- Rust
- Introduce the UUID metric type in the RLB.
- Introduce the Labeled metric type in the RLB (#1327).
- Introduce the Quantity metric type in the RLB.
- Introduce the
shutdownAPI. - Add Glean debugging APIs.
- Python
- BUGFIX: Setting a UUID metric to a value that is not in the expected UUID format will now record an error with the Glean error reporting system.
v33.4.0 (2020-11-17)
- General
- When Rkv's safe mode is enabled (
features = ["rkv-safe-mode"]on theglean-corecrate) LMDB data is migrated at first start (#1322).
- When Rkv's safe mode is enabled (
- Rust
- Introduce the Counter metric type in the RLB.
- Introduce the String metric type in the RLB.
- BUGFIX: Track the size of the database directory at startup (#1304).
- Python
- BUGFIX: Fix too-long sleep time in uploader due to unit mismatch (#1325).
- Swift
- BUGFIX: Fix too-long sleep time in uploader due to unit mismatch (#1325).
v33.3.0 (2020-11-12)
- General
- Do not require default-features on
rkvand downgradebincode(#1317)
- Do not require default-features on
- Rust
- Implement the experiments API (#1314)
v33.2.0 (2020-11-10)
- Python
- Fix building of Linux wheels (#1303)
- Python Linux wheels no longer work on Linux distributions released before 2010. (They now use the manylinux2010 ABI, rather than the manylinux1 ABI.)
- Fix building of Linux wheels (#1303)
- Rust
- Introduce the RLB
netmodule (#1292)
- Introduce the RLB
v33.1.2 (2020-11-04)
- No changes. v33.1.1 was tagged incorrectly.
v33.1.1 (2020-11-04)
- No changes. v33.1.0 was tagged incorrectly.
v33.1.0 (2020-11-04)
- General
- Standardize throttle backoff time throughout all bindings. (#1240)
- Update
glean_parserto 1.29.0- Generated code now includes a comment next to each metric containing the name of the metric in its original
snake_caseform.
- Generated code now includes a comment next to each metric containing the name of the metric in its original
- Expose the description of the metric types in glean_core using traits.
- Rust
- Add the
BooleanMetrictype. - Add the
dispatchermodule (copied over from mozilla-central). - Allow consumers to specify a custom uploader.
- Add the
- Android
- Update the JNA dependency from 5.2.0 to 5.6.0
- The
glean-gradle-pluginnow makes sure that only a single Miniconda installation will happen at the same time to avoid a race condition when multiple components within the same project are using Glean.
v33.0.4 (2020-09-28)
Note: Previous 33.0.z releases were broken. This release now includes all changes from 33.0.0 to 33.0.3.
- General
- Update
glean_parserto 1.28.6- BUGFIX: Ensure Kotlin arguments are deterministically ordered
- Update
- Android
- Breaking change: Updated to the Android Gradle Plugin v4.0.1 and Gradle 6.5.1. Projects using older versions of these components will need to update in order to use newer versions of the Glean SDK.
- Update the Kotlin Gradle Plugin to version 1.4.10.
- Fixed the building of
.aarreleases on Android so they include the Rust shared objects.
v33.0.3 (2020-09-25)
- General
- v33.0.2 was tagged incorrectly. This release is just to correct that mistake.
v33.0.2 (2020-09-25)
- Android
- Fixed the building of
.aarreleases on Android so they include the Rust shared objects.
- Fixed the building of
v33.0.1 (2020-09-24)
- General
- Update
glean_parserto 1.28.6- BUGFIX: Ensure Kotlin arguments are deterministically ordered
- Update
- Android
- Update the Kotlin Gradle Plugin to version 1.4.10.
v33.0.0 (2020-09-22)
- Android
- Breaking change: Updated to the Android Gradle Plugin v4.0.1 and Gradle 6.5.1. Projects using older versions of these components will need to update in order to use newer versions of the Glean SDK.
v32.4.1 (2020-10-01)
- General
- Update
glean_parserto 1.28.6- BUGFIX: Ensure Kotlin arguments are deterministically ordered
- BUGFIX: Transform ping directory size from bytes to kilobytes before accumulating to
glean.upload.pending_pings_directory_size(#1236).
- Update
v32.4.0 (2020-09-18)
- General
- Allow using quantity metric type outside of Gecko (#1198)
- Update
glean_parserto 1.28.5- The
SUPERFLUOUS_NO_LINTwarning has been removed from the glinter. It likely did more harm than good, and makes it hard to make metrics.yaml files that pass across different versions ofglean_parser. - Expired metrics will now produce a linter warning,
EXPIRED_METRIC. - Expiry dates that are more than 730 days (~2 years) in the future will produce a linter warning,
EXPIRATION_DATE_TOO_FAR. - Allow using the Quantity metric type outside of Gecko.
- New parser configs
custom_is_expiredandcustom_validate_expiresadded. These are both functions that take the expires value of the metric and return a bool. (SeeMetric.is_expiredandMetric.validate_expires). These will allow FOG to provide custom validation for its version-basedexpiresvalues.
- The
- Add a limit of 250 pending ping files. (#1217).
- Android
- Don't retry the ping uploader when waiting, sleep instead. This avoids a never-ending increase of the backoff time (#1217).
v32.3.2 (2020-09-11)
- General
- Track the size of the database file at startup (#1141).
- Submitting a ping with upload disabled no longer shows an error message (#1201).
- BUGFIX: scan the pending pings directories after dealing with upload status on initialization. This is important, because in case upload is disabled we delete any outstanding non-deletion ping file, and if we scan the pending pings folder before doing that we may end up sending pings that should have been discarded. (#1205)
- iOS
- Disabled code coverage in release builds (#1195).
- Python
- Glean now ships a source package to pip install on platforms where wheels aren't provided.
v32.3.1 (2020-09-09)
- Python
- Fixed the release process to generate all wheels (#1193).
v32.3.0 (2020-08-27)
- Android
- Handle ping registration off the main thread. This removes a potential blocking call (#1132).
- iOS
v32.2.0 (2020-08-25)
- General
- Move logic to limit the number of retries on ping uploading "recoverable failures" to glean-core. (#1120)
- The functionality to limit the number of retries in these cases was introduced to the Glean SDK in
v31.1.0. The work done now was to move that logic to the glean-core in order to avoid code duplication throughout the language bindings.
- The functionality to limit the number of retries in these cases was introduced to the Glean SDK in
- Update
glean_parsertov1.28.3- BUGFIX: Generate valid C# code when using Labeled metric types.
- BUGFIX: Support
HashSetandDictionaryin the C# generated code.
- Add a 10MB quota to the pending pings storage. (#1100)
- Move logic to limit the number of retries on ping uploading "recoverable failures" to glean-core. (#1120)
- C#
- Add support for the String List metric type (#1108).
- Enable generating the C# APIs using the glean_parser (#1092).
- Add support for the
EventMetricTypein C# (#1129). - Add support for the
TimingDistributionMetricTypein C# (#1131). - Implement the experiments API in C# (#1145).
- This is the last release with C# language bindings changes. Reach out to the Glean SDK team if you want to use the C# bindings in a new product and require additional features.
- Python
- BUGFIX: Limit the number of retries for 5xx server errors on ping uploads (#1120).
- This kinds of failures yield a "recoverable error", which means the ping gets re-enqueued. That can cause infinite loops on the ping upload worker. For python we were incorrectly only limiting the number of retries for I/O errors, another type of "recoverable error".
kebab-caseping names are now converted tosnake_caseso they are available on the object returned byload_pings(#1122).- For performance reasons, the
glinteris no longer run as part ofglean.load_metrics(). We recommend runningglinteras part of your project's continuous integration instead (#1124). - A
measurecontext manager for conveniently measuring runtimes has been added toTimespanMetricTypeandTimingDistributionMetricType(#1126). - Networking errors have changed from
ERRORlevel toDEBUGlevel so they aren't displayed by default (#1166).
- BUGFIX: Limit the number of retries for 5xx server errors on ping uploads (#1120).
- iOS
v32.1.1 (2020-08-24)
- Android
- Support installing glean_parser in offline mode (#1065).
- Fix a startup crash on some Android 8 (SDK=25) devices, due to a bug in the Java compiler (#1135).
v32.1.0 (2020-08-17)
- General
- The upload rate limiter has been changed from 10 pings per minute to 15 pings per minute.
v32.0.0 (2020-08-03)
- General
- Limit ping request body size to 1MB. (#1098)
- iOS
- Implement ping tagging (i.e. the
X-Source-Tagsheader) through custom URL (#1100).
- Implement ping tagging (i.e. the
- C#
- Add support for Labeled Strings and Labeled Booleans.
- Add support for the Counter metric type and Labeled Counter.
- Add support for the
MemoryDistributionMetricType.
- Python
- Breaking change:
data_dirmust always be passed toGlean.initialize. Prior to this, a missing value would store Glean data in a temporary directory. - Logging messages from the Rust core are now sent through Python's standard library
loggingmodule. Therefore all logging in a Python application can be controlled through theloggingmodule interface.
- Breaking change:
- Android
- BUGFIX: Require activities executed via
GleanDebugViewto be exported.
- BUGFIX: Require activities executed via
v31.6.0 (2020-07-24)
- General
- Implement JWE metric type (#1073, #1062).
- DEPRECATION:
getUploadEnabledis deprecated (respectivelyget_upload_enabledin Python) (#1046)- Due to Glean's asynchronous initialization the return value can be incorrect. Applications should not rely on Glean's internal state. Upload enabled status should be tracked by the application and communicated to Glean if it changes. Note: The method was removed from the C# and Python implementation.
- Update
glean_parsertov1.28.1- The
glean_parserlinting was leading consumers astray by incorrectly suggesting thatdeletion-requestbe insteaddeletion_requestwhen used forsend_in_pings. This was causing metrics intended for thedeletion-requestping to not be included when it was collected and submitted. Consumers that are sending metrics in thedeletion-requestping will need to update thesend_in_pingsvalue in their metrics.yaml to correct this. - Fixes a bug in doc rendering.
- The
v31.5.0 (2020-07-22)
- General
- Implement ping tagging (i.e. the
X-Source-Tagsheader) (#1074). Note that this is not yet implemented for iOS. - String values that are too long now record
invalid_overflowrather thaninvalid_valuethrough the Glean error reporting mechanism. This affects the string, event and string list metrics. metrics.yamlfiles now support adata_sensitivityfield to all metrics for specifying the type of data collected in the field.
- Implement ping tagging (i.e. the
- Python
- The Python unit tests no longer send telemetry to the production telemetry endpoint.
- BUGFIX: If an
application_versionisn't provided toGlean.initialize, theclient_info.app_display_versionmetric is set to"Unknown", rather than resulting in invalid pings.
- Android
- Allow defining which
Activityto run next when using theGleanDebugActivity.
- Allow defining which
- iOS
- BUGFIX: The memory unit is now correctly set on the
MemoryDistributionmetric type in Swift in generated metrics code.
- BUGFIX: The memory unit is now correctly set on the
- C#
- Metrics can now be generated from the
metrics.yamlfiles.
- Metrics can now be generated from the
v31.4.1 (2020-07-20)
- General
- BUGFIX: fix
int32toErrorTypemapping. TheInvalidOverflowhad a value mismatch between glean-core and the bindings. This would only be a problem in unit tests. (#1063)
- BUGFIX: fix
- Android
- Enable propagating options to the main product Activity when using the
GleanDebugActivity. - BUGFIX: Fix the metrics ping collection for startup pings such as
reason=upgradeto occur in the same thread/task as Glean initialize. Otherwise, it gets collected after the application lifetime metrics are cleared such as experiments that should be in the ping. (#1069)
- Enable propagating options to the main product Activity when using the
v31.4.0 (2020-07-16)
- General
- Enable debugging features through environment variables. (#1058)
v31.3.0 (2020-07-10)
- General
- Python
- iOS
- BUGFIX: Make
LabeledMetricsubscript public, so consuming applications can actually access it (#1027)
- BUGFIX: Make
v31.2.3 (2020-06-29)
- General
v31.2.2 (2020-06-26)
- Android
- BUGFIX: Compile dependencies with
NDEBUGto avoid linking unavailable symbols. This fixes a crash due to a missingstderrsymbol on older Android (#1020)
- BUGFIX: Compile dependencies with
v31.2.1 (2020-06-25)
- Python
- BUGFIX: Core metrics are now present in every ping, even if submit is called before initialize has a chance to complete. (#1012)
v31.2.0 (2020-06-24)
- General
- Android
- BUGFIX: baseline pings with reason "dirty startup" are no longer sent if Glean did not full initialize in the previous run (#996).
- Python
v31.1.2 (2020-06-23)
- General
- BUGFIX: Correctly format the date and time in the
Dateheader (#993).
- BUGFIX: Correctly format the date and time in the
- Python
v31.1.1 (2020-06-12)
- Android
- Dropping the version requirement for lifecycle extensions down again. Upping the required version caused problems in A-C.
v31.1.0 (2020-06-11)
- General:
- Python
- Additional safety guarantees for applications that use Python
threading(#962)
- Additional safety guarantees for applications that use Python
v31.0.2 (2020-05-29)
- Rust
- Fix list of included files in published crates
v31.0.1 (2020-05-29)
- Rust
- Relax version requirement for
flate2for compatibility reasons
- Relax version requirement for
v31.0.0 (2020-05-28)
-
General:
- The version of
glean_parserhas been upgraded to v1.22.0- A maximum of 10
extra_keysis now enforced for event metric types. - Breaking change: (Swift only) Combine all metrics and pings into a single generated file Metrics.swift.
- For Swift users this requires to change the list of output files for the
sdk_generator.shscript. It now only needs to include the single fileGenerated/Metrics.swift.
- For Swift users this requires to change the list of output files for the
- A maximum of 10
- The version of
-
Python:
- BUGFIX:
lifetime: applicationmetrics are no longer recorded aslifetime: user. - BUGFIX: glean-core is no longer crashing when calling
uuid.setwith invalid UUIDs. - Refactor the ping uploader to use the new upload mechanism and add gzip compression.
- Most of the work in
Glean.initializehappens on a worker thread and no longer blocks the main thread.
- BUGFIX:
-
Rust:
- Expose
Datetimetypes to Rust consumers.
- Expose
v30.1.0 (2020-05-22)
- Android & iOS
- Ping payloads are now compressed using gzip.
- iOS
Glean.initializeis now a no-op if called from an embedded extension. This means that Glean will only run in the base application process in order to prevent extensions from behaving like separate applications with different client ids from the base application. Applications are responsible for ensuring that extension metrics are only collected within the base application.
- Python
lifetime: applicationmetrics are now cleared after the Glean-owned pings are sent, after the product starts.- Glean Python bindings now build in a native Windows environment.
- BUGFIX:
MemoryDistributionMetricnow parses correctly inmetrics.yamlfiles. - BUGFIX: Glean will no longer crash if run as part of another library's coverage testing.
v30.0.0 (2020-05-13)
- General:
- We completely replaced how the upload mechanism works. glean-core (the Rust part) now controls all upload and coordinates the platform side with its own internals. All language bindings implement ping uploading around a common API and protocol. There is no change for users of Glean, the language bindings for Android and iOS have been adopted to the new mechanism already.
- Expose
RecordedEventandDistributionDatatypes to Rust consumers (#876) - Log crate version at initialize (#873)
- Android:
- Refactor the ping uploader to use the new upload mechanism.
- iOS:
- Refactor the ping uploader to use the new upload mechanism.
v29.1.2 (2021-01-26)
This is an iOS release only, built with Xcode 11.7
Otherwise no functional changes.
- iOS
- Build with Xcode 11.7 (#1457)
v29.1.1 (2020-05-22)
- Android
- BUGFIX: Fix a race condition that leads to a
ConcurrentModificationException. Bug 1635865
- BUGFIX: Fix a race condition that leads to a
v29.1.0 (2020-05-11)
- General:
- The version of glean_parser has been upgraded to v1.20.4
- BUGFIX:
yamllinterrors are now reported using the correct file name.
- BUGFIX:
- The minimum and maximum values of a timing distribution can now be controlled by the
time_unitparameter. See bug 1630997 for more details.
- The version of glean_parser has been upgraded to v1.20.4
v29.0.0 (2020-05-05)
- General:
- The version of glean_parser has been upgraded to v1.20.2 (#827):
- Breaking change: glinter errors found during code generation will now return an error code.
glean_parsernow produces a linter warning whenuserlifetime metrics are set to expire. See bug 1604854 for additional context.
- The version of glean_parser has been upgraded to v1.20.2 (#827):
- Android:
- The
PingType.submit()can now be called without anullby Java consumers (#853).
- The
- Python:
- BUGFIX: Fixed a race condition in the
atexithandler, that would have resulted in the message "No database found" (#854). - The Glean FFI header is now parsed at build time rather than runtime. Relevant for packaging in
PyInstaller, the wheel no longer includesglean.hand adds_glean_ffi.py(#852). - The minimum versions of many secondary dependencies have been lowered to make the Glean SDK compatible with more environments.
- Dependencies that depend on the version of Python being used are now specified using the Declaring platform specific dependencies syntax in setuptools. This means that more recent versions of dependencies are likely to be installed on Python 3.6 and later, and unnecessary backport libraries won't be installed on more recent Python versions.
- BUGFIX: Fixed a race condition in the
- iOS:
- Glean for iOS is now being built with Xcode 11.4.1 (#856)
v28.0.0 (2020-04-23)
- General:
- The baseline ping is now sent when the application goes to foreground, in addition to background and dirty-startup.
- Python:
- BUGFIX: The ping uploader will no longer display a trace back when the upload fails due to a failed DNS lookup, network outage, or related issues that prevent communication with the telemetry endpoint.
- The dependency on
inflectionhas been removed. - The Python bindings now use
subprocessrather thanmultiprocessingto perform ping uploading in a separate process. This should be more compatible on all of the platforms Glean supports.
v27.1.0 (2020-04-09)
- General:
- BUGFIX: baseline pings sent at startup with the
dirty_startupreason will now include application lifetime metrics (#810)
- BUGFIX: baseline pings sent at startup with the
- iOS:
- Breaking change: Change Glean iOS to use Application Support directory #815. No migration code is included. This will reset collected data if integrated without migration. Please contact the Glean SDK team if this affects you.
- Python
- BUGFIX: Fixed a race condition between uploading pings and deleting the temporary directory on shutdown of the process.
v27.0.0 (2020-04-08)
- General
- Glean will now detect when the upload enabled flag changes outside of the application, for example due to a change in a config file. This means that if upload is disabled while the application wasn't running (e.g. between the runs of a Python command using the Glean SDK), the database is correctly cleared and a deletion request ping is sent. See #791.
- The
eventsping now includes a reason code:startup,backgroundormax_capacity.
- iOS:
- BUGFIX: A bug where the metrics ping is sent immediately at startup on the last day of the month has been fixed.
- Glean for iOS is now being built with Xcode 11.4.0
- The
measureconvenience function on timing distributions and time spans will now cancel the timing if the measured function throws, then rethrow the exception (#808) - Broken doc generation has been fixed (#805).
- Kotlin
- The
measureconvenience function on timing distributions and time spans will now cancel the timing if the measured function throws, then rethrow the exception (#808)
- The
- Python:
- Glean will now wait at application exit for up to one second to let its worker thread complete.
- Ping uploading now happens in a separate child process by default. This can be disabled with the
allow_multiprocessingconfiguration option.
v26.0.0 (2020-03-27)
- General:
- The version of
glean_parserhas been updated to 1.19.0:- Breaking change: The regular expression used to validate labels is stricter and more correct.
- Add more information about pings to markdown documentation:
- State whether the ping includes client id;
- Add list of data review links;
- Add list of related bugs links.
glean_parsernow makes it easier to write external translation functions for different language targets.- BUGFIX: glean_parser now works on 32-bit Windows.
- The version of
- Android:
gradlew cleanwill no longer remove the Miniconda installation in~/.gradle/glean. Thereforecleancan be used without reinstalling Miniconda afterward every time.
- Python:
- Breaking Change: The
glean.utilandglean.hardwaremodules, which were unintentionally public, have been made private. - Most Glean work and I/O is now done on its own worker thread. This brings the parallelism Python in line with the other platforms.
- The timing distribution, memory distribution, string list, labeled boolean and labeled string metric types are now supported in Python (#762, #763, #765, #766)
- Breaking Change: The
v25.1.0 (2020-02-26)
- Python:
v25.0.0 (2020-02-17)
- General:
ping_typeis not included in theping_infoany more (#653), the pipeline takes the value from the submission URL.- The version of
glean_parserhas been upgraded to 1.18.2:- Breaking Change (Java API) Have the metrics names in Java match the names in Kotlin. See Bug 1588060.
- The reasons a ping are sent are now included in the generated markdown documentation.
- Android:
- The
Glean.initializemethod runs mostly off the main thread (#672). - Labels in labeled metrics now have a correct, and slightly stricter, regular expression. See label format for more information.
- The
- iOS:
- The baseline ping will now include
reasoncodes that indicate why it was submitted. If an unclean shutdown is detected (e.g. due to force-close), this ping will be sent at startup withreason: dirty_startup. - Per Bug 1614785, the clearing of application lifetime metrics now occurs after the metrics ping is sent in order to preserve values meant to be included in the startup metrics ping.
initialize()now performs most of its work in a background thread.
- The baseline ping will now include
- Python:
- When the pre-init task queue overruns, this is now recorded in the metric
glean.error.preinit_tasks_overflow. - glinter warnings are printed to
stderrwhen loadingmetrics.yamlandpings.yamlfiles.
- When the pre-init task queue overruns, this is now recorded in the metric
v24.2.0 (2020-02-11)
- General:
- Add
localetoclient_infosection. - Deprecation Warning Since
localeis now in theclient_infosection, the one in the baseline ping (glean.baseline.locale) is redundant and will be removed by the end of the quarter. - Drop the Glean handle and move state into glean-core (#664)
- If an experiment includes no
extrafields, it will no longer include{"extra": null}in the JSON payload. - Support for ping
reasoncodes was added. - The metrics ping will now include
reasoncodes that indicate why it was submitted. - The version of
glean_parserhas been upgraded to 1.17.3
- Add
- Android:
- Collections performed before initialization (preinit tasks) are now dispatched off the main thread during initialization.
- The baseline ping will now include
reasoncodes that indicate why it was submitted. If an unclean shutdown is detected (e.g. due to force-close), this ping will be sent at startup withreason: dirty_startup.
- iOS:
- Collections performed before initialization (preinit tasks) are now dispatched off the main thread and not awaited during initialization.
- Added recording of
glean.error.preinit_tasks_overflowto report when the preinit task queue overruns, leading to data loss. See bug 1609734
v24.1.0 (2020-01-16)
- General:
- Stopping a non started measurement in a timing distribution will now be reported
as an
invalid_stateerror.
- Stopping a non started measurement in a timing distribution will now be reported
as an
- Android:
- A new metric
glean.error.preinit_tasks_overflowwas added to report when the preinit task queue overruns, leading to data loss. See bug 1609482
- A new metric
v24.0.0 (2020-01-14)
- General:
- Breaking Change An
enableUploadparameter has been added to theinitialize()function. This removes the requirement to callsetUploadEnabled()prior to calling theinitialize()function.
- Breaking Change An
- Android:
- The metrics ping scheduler will now only send metrics pings while the application is running. The application will no longer "wake up" at 4am using the Work Manager.
- The code for migrating data from Glean SDK before version 19 was removed.
- When using the
GleanTestLocalServerrule in instrumented tests, pings are immediately flushed by theWorkManagerand will reach the test endpoint as soon as possible.
- Python:
- The Python bindings now support Python 3.5 - 3.7.
- The Python bindings are now distributed as a wheel on Linux, macOS and Windows.
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.
parseISOTimeStringhas been made 4x faster. This had an impact on Glean migration and initialization.- Metrics with
lifetime: applicationare 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_requestping todeletion-requestping after glean_parser update
- The public method
v22.1.0 (2019-12-17)
- Add
InvalidOverflowerror toTimingDistributions (#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_requestpings 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_parserto 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
LifecycleEventObserverinterface, rather than theDefaultLifecycleObserverinterface, 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
GleanTimerIdcan 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_parserto 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
starton 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 stateerror, 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
jnaTestdependencies to theforUnitTestJAR (#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
forUnitTestsbuilds (#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_parserversion to 1.9.2
v0.0.1-TESTING2 (2019-10-07)
- Include a Windows library in the
forUnitTestsbuilds
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 Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glean-sdk-42.3.0.tar.gz.
File metadata
- Download URL: glean-sdk-42.3.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce3629f6c29d23929c0efbf0e52fe4829732bd47df3c563ffb3ed5569ee5e7b
|
|
| MD5 |
62bea88c12142b5674c22af4cb49427d
|
|
| BLAKE2b-256 |
d6ba5304dc9570b7faa42e2603ea087fc03ebedd1936c3533fd7815cd93261cc
|
File details
Details for the file glean_sdk-42.3.0-py3-none-win_amd64.whl.
File metadata
- Download URL: glean_sdk-42.3.0-py3-none-win_amd64.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0d8867ca0d3bd565b0767946b9930f306ec81043b938845759e4e6be053ede6
|
|
| MD5 |
d9f6e231725cb60d5289c8cd4d6f723d
|
|
| BLAKE2b-256 |
549b195be2338cf033eea057f88229c2197b104b60a91596de2739e62d27f81a
|
File details
Details for the file glean_sdk-42.3.0-py3-none-win32.whl.
File metadata
- Download URL: glean_sdk-42.3.0-py3-none-win32.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a53313fbbcd0c8f3ada1b71185f76299359cd4fee3991dd62c2133c681f567
|
|
| MD5 |
705f3a1b70f035bb1f23935e286a6ca8
|
|
| BLAKE2b-256 |
e6701711e17ec0d0a1b5b278ae0df3eac5814d5be6066bbfe78509951c4627c5
|
File details
Details for the file glean_sdk-42.3.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: glean_sdk-42.3.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.6+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebd9033bf0c8a5d0cad255ec252578be03dfe5c111fd29b72a85079eb51c3a20
|
|
| MD5 |
34db7b70a01c2f62585714d198e68d01
|
|
| BLAKE2b-256 |
393c9e3e256756af9301675b07c89af74fe135ecc4ba6f6a215446826bf6b8ab
|
File details
Details for the file glean_sdk-42.3.0-cp36-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: glean_sdk-42.3.0-cp36-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 864.0 kB
- Tags: CPython 3.6+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f8e9066de3b75b8ae0efe3c542f0162f15b3519ce7aa7c8784adffed5468f31
|
|
| MD5 |
f0d8d50e712ff58785f3a59b626ac9b5
|
|
| BLAKE2b-256 |
7526b6ddcd1466a5ecb05353a0807c20df0f813f2deb5bad1f33e3a3a699394a
|
File details
Details for the file glean_sdk-42.3.0-cp36-abi3-macosx_10_7_x86_64.whl.
File metadata
- Download URL: glean_sdk-42.3.0-cp36-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 921.4 kB
- Tags: CPython 3.6+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa4a6f74f86024ff2b170f36c48031785304ffb0eb155550af0e7779f77bb49c
|
|
| MD5 |
0d5a60a03555d4b1fcfa523390ead1df
|
|
| BLAKE2b-256 |
47e9e4e618ee91e327b7ce94676e37ec36c89de1ab804583682f398c332f7311
|