summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean/src
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/src
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 '')
-rw-r--r--third_party/rust/glean/src/common_test.rs1
-rw-r--r--third_party/rust/glean/src/configuration.rs12
-rw-r--r--third_party/rust/glean/src/lib.rs1
3 files changed, 13 insertions, 1 deletions
diff --git a/third_party/rust/glean/src/common_test.rs b/third_party/rust/glean/src/common_test.rs
index e3c80da5f2..fdb7cfadbf 100644
--- a/third_party/rust/glean/src/common_test.rs
+++ b/third_party/rust/glean/src/common_test.rs
@@ -42,7 +42,6 @@ pub(crate) fn new_glean(
Some(c) => c,
None => ConfigurationBuilder::new(true, tmpname, GLOBAL_APPLICATION_ID)
.with_server_endpoint("invalid-test-host")
- .with_event_timestamps(false)
.build(),
};
diff --git a/third_party/rust/glean/src/configuration.rs b/third_party/rust/glean/src/configuration.rs
index ca0a39c3f1..462bedaa7a 100644
--- a/third_party/rust/glean/src/configuration.rs
+++ b/third_party/rust/glean/src/configuration.rs
@@ -46,6 +46,8 @@ pub struct Configuration {
/// be noted that this has an underlying StringMetric and so should conform to the limitations that
/// StringMetric places on length, etc.
pub experimentation_id: Option<String>,
+ /// Whether to enable internal pings. Default: true
+ pub enable_internal_pings: bool,
}
/// Configuration builder.
@@ -92,6 +94,8 @@ pub struct Builder {
/// be noted that this has an underlying StringMetric and so should conform to the limitations that
/// StringMetric places on length, etc.
pub experimentation_id: Option<String>,
+ /// Whether to enable internal pings. Default: true
+ pub enable_internal_pings: bool,
}
impl Builder {
@@ -115,6 +119,7 @@ impl Builder {
rate_limit: None,
enable_event_timestamps: true,
experimentation_id: None,
+ enable_internal_pings: true,
}
}
@@ -134,6 +139,7 @@ impl Builder {
rate_limit: self.rate_limit,
enable_event_timestamps: self.enable_event_timestamps,
experimentation_id: self.experimentation_id,
+ enable_internal_pings: self.enable_internal_pings,
}
}
@@ -184,4 +190,10 @@ impl Builder {
self.experimentation_id = Some(value);
self
}
+
+ /// Set whether to enable internal pings.
+ pub fn with_internal_pings(mut self, value: bool) -> Self {
+ self.enable_internal_pings = value;
+ self
+ }
}
diff --git a/third_party/rust/glean/src/lib.rs b/third_party/rust/glean/src/lib.rs
index 5c5b945a95..81899d42ee 100644
--- a/third_party/rust/glean/src/lib.rs
+++ b/third_party/rust/glean/src/lib.rs
@@ -122,6 +122,7 @@ fn initialize_internal(cfg: Configuration, client_info: ClientInfoMetrics) -> Op
rate_limit: cfg.rate_limit,
enable_event_timestamps: cfg.enable_event_timestamps,
experimentation_id: cfg.experimentation_id,
+ enable_internal_pings: cfg.enable_internal_pings,
};
glean_core::glean_initialize(core_cfg, client_info.into(), callbacks);