summaryrefslogtreecommitdiffstats
path: root/third_party/rust/glean/src
diff options
context:
space:
mode:
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);