Skip to content

Commit

Permalink
Bug 1862640 - Use correct argument name in initialization docs
Browse files Browse the repository at this point in the history
[doc only]
  • Loading branch information
badboy committed Nov 14, 2023
1 parent 8b5c3b9 commit 0050d4c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/user/reference/general/initializing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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(<main_process_name>)`
Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 0050d4c

Please sign in to comment.