From 9a439ffb773b0ca00b8175ad8034ba386c39d23f Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Mon, 13 Nov 2023 14:06:18 +0100 Subject: [PATCH 1/2] Bug 1862640 - Use correct argument name in initialization docs [doc only] --- docs/user/reference/general/initializing.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/user/reference/general/initializing.md b/docs/user/reference/general/initializing.md index c7e90968ef..3d8ff4a387 100644 --- a/docs/user/reference/general/initializing.md +++ b/docs/user/reference/general/initializing.md @@ -81,8 +81,8 @@ To learn about SDK specific configuration options available, refer to the [Refer > Glean must **always** be initialized with real values. > -> Always pass the user preference, e.g. `Glean.initialize(upload=userSettings.telemetry_enabled)` or the equivalent for your application. -> Never call `Glean.initialize(upload=true)` if `true` is a placeholder value that later gets reset by `Glean.setUploadEnabled(false)` and vice-versa. +> Always pass the user preference, e.g. `Glean.initialize(uploadEnabled=userSettings.telemetryEnabled)` or the equivalent for your application. +> Never call `Glean.initialize(uploadEnabled=true)` if `true` is a placeholder value that later gets reset by `Glean.setUploadEnabled(false)` and vice-versa. > > Depending on the provided placeholder value, this might trigger the generation of new client ids or the submission of bogus [`deletion-request` pings](../../user/pings/deletion-request.md). @@ -120,7 +120,8 @@ class SampleApplication : Application() { The Glean Kotlin SDK supports use across multiple processes. This is enabled by setting a `dataPath` value in the `Glean.Configuration` object passed to `Glean.initialize`. You **do not** need to set a `dataPath` for your main process. This configuration should only be used by a non-main process. -Requirements for a non-main process +Requirements for a non-main process: + - `Glean.initialize` must be called with the `dataPath` value set in the `Glean.Configuration`. - The default `dataPath` for Glean is `{context.applicationInfo.dataDir}/glean_data`. If you try to use this path, `Glean.initialize` will fail and throw an error. - [Set the default process name](https://developer.android.com/reference/androidx/work/Configuration.Builder#setDefaultProcessName(java.lang.String)) as your main process. If this is not set up correctly, pings from the non-main process will not send. `Configuration.Builder().setDefaultProcessName()` @@ -186,7 +187,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { The Glean Swift SDK supports use across multiple processes. This is enabled by setting a `dataPath` value in the `Glean.Configuration` object passed to `Glean.initialize`. You **do not** need to set a `dataPath` for your main process. This configuration should only be used by a non-main process. -Requirements for a non-main process +Requirements for a non-main process: + - `Glean.initialize` must be called with the `dataPath` value set in the `Glean.Configuration`. - On iOS devices, Glean stores data in the Application Support directory. The default `dataPath` Glean uses is `{FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask)[0]}/glean_data`. If you try to use this path, `Glean.initialize` will fail and throw an error. From 7d27f08313d5678c441062844d58c4037cdeb1b1 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Mon, 13 Nov 2023 14:20:13 +0100 Subject: [PATCH 2/2] Bug 1862641 - Reword note about calling with the correct uploadEnabled value [doc only] --- docs/user/reference/general/initializing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/user/reference/general/initializing.md b/docs/user/reference/general/initializing.md index 3d8ff4a387..0aa6c88d7c 100644 --- a/docs/user/reference/general/initializing.md +++ b/docs/user/reference/general/initializing.md @@ -82,9 +82,9 @@ To learn about SDK specific configuration options available, refer to the [Refer > Glean must **always** be initialized with real values. > > Always pass the user preference, e.g. `Glean.initialize(uploadEnabled=userSettings.telemetryEnabled)` or the equivalent for your application. -> Never call `Glean.initialize(uploadEnabled=true)` if `true` is a placeholder value that later gets reset by `Glean.setUploadEnabled(false)` and vice-versa. > -> Depending on the provided placeholder value, this might trigger the generation of new client ids or the submission of bogus [`deletion-request` pings](../../user/pings/deletion-request.md). +> Calling `Glean.setUploadEnabled(false)` at a later point will trigger [`deletion-request` pings](../../user/pings/deletion-request.md) and regenerate client IDs. +> This should only be done if the user preference actually changes. {{#include ../../../shared/tab_header.md}}