summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean-core/src/core/mod.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:35:49 +0000
commitd8bbc7858622b6d9c278469aab701ca0b609cddf (patch)
treeeff41dc61d9f714852212739e6b3738b82a2af87 /third_party/rust/glean-core/src/core/mod.rs
parentReleasing progress-linux version 125.0.3-1~progress7.99u1. (diff)
downloadfirefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz
firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/glean-core/src/core/mod.rs')
-rw-r--r--third_party/rust/glean-core/src/core/mod.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/third_party/rust/glean-core/src/core/mod.rs b/third_party/rust/glean-core/src/core/mod.rs
index 30f9a34f11..f69f0c3868 100644
--- a/third_party/rust/glean-core/src/core/mod.rs
+++ b/third_party/rust/glean-core/src/core/mod.rs
@@ -120,6 +120,7 @@ where
/// rate_limit: None,
/// enable_event_timestamps: true,
/// experimentation_id: None,
+/// enable_internal_pings: true,
/// };
/// let mut glean = Glean::new(cfg).unwrap();
/// let ping = PingType::new("sample", true, false, true, true, vec![]);
@@ -208,7 +209,7 @@ impl Glean {
core_metrics: CoreMetrics::new(),
additional_metrics: AdditionalMetrics::new(),
database_metrics: DatabaseMetrics::new(),
- internal_pings: InternalPings::new(),
+ internal_pings: InternalPings::new(cfg.enable_internal_pings),
upload_manager,
data_path: PathBuf::from(&cfg.data_path),
application_id,
@@ -288,7 +289,9 @@ impl Glean {
}
// We set this only for non-subprocess situations.
- glean.schedule_metrics_pings = cfg.use_core_mps;
+ // If internal pings are disabled, we don't set up the MPS either,
+ // it wouldn't send any data anyway.
+ glean.schedule_metrics_pings = cfg.enable_internal_pings && cfg.use_core_mps;
// We only scan the pendings pings directories **after** dealing with the upload state.
// If upload is disabled, we delete all pending pings files
@@ -305,6 +308,7 @@ impl Glean {
data_path: &str,
application_id: &str,
upload_enabled: bool,
+ enable_internal_pings: bool,
) -> Self {
let cfg = InternalConfiguration {
data_path: data_path.into(),
@@ -320,6 +324,7 @@ impl Glean {
rate_limit: None,
enable_event_timestamps: true,
experimentation_id: None,
+ enable_internal_pings,
};
let mut glean = Self::new(cfg).unwrap();