From b609d227668b16566af26aef7a81c8a0ababe482 Mon Sep 17 00:00:00 2001 From: Perry McManis Date: Tue, 11 Jul 2023 10:21:10 -0400 Subject: [PATCH] Bug 1841075 - PingRateLimit should be re-exported in RLB --- CHANGELOG.md | 3 +++ glean-core/rlb/src/configuration.rs | 2 +- glean-core/rlb/src/lib.rs | 4 ++-- glean-core/rlb/src/test.rs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 005f4076e7..39b317b453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ [Full changelog](https://github.com/mozilla/glean/compare/v53.1.0...main) +* Rust + * The Ping Rate Limit type is now accessible in the Rust Language Binding ([#2528](https://github.com/mozilla/glean/pull/2528)) + # v53.1.0 (2023-06-28) [Full changelog](https://github.com/mozilla/glean/compare/v53.0.0...v53.1.0) diff --git a/glean-core/rlb/src/configuration.rs b/glean-core/rlb/src/configuration.rs index 66200ee1a5..db44c8fce1 100644 --- a/glean-core/rlb/src/configuration.rs +++ b/glean-core/rlb/src/configuration.rs @@ -39,7 +39,7 @@ pub struct Configuration { /// The internal logging level. pub log_level: Option, /// The rate pings may be uploaded before they are throttled. - pub rate_limit: Option, + pub rate_limit: Option, } /// Configuration builder. diff --git a/glean-core/rlb/src/lib.rs b/glean-core/rlb/src/lib.rs index 06c7786e0a..70924c95f2 100644 --- a/glean-core/rlb/src/lib.rs +++ b/glean-core/rlb/src/lib.rs @@ -36,8 +36,8 @@ pub use configuration::{Builder as ConfigurationBuilder, Configuration}; pub use core_metrics::ClientInfoMetrics; pub use glean_core::{ metrics::{Datetime, DistributionData, MemoryUnit, Rate, RecordedEvent, TimeUnit, TimerId}, - traits, CommonMetricData, Error, ErrorType, Glean, HistogramType, Lifetime, RecordedExperiment, - Result, + traits, CommonMetricData, Error, ErrorType, Glean, HistogramType, Lifetime, PingRateLimit, + RecordedExperiment, Result, }; mod configuration; diff --git a/glean-core/rlb/src/test.rs b/glean-core/rlb/src/test.rs index 2b7fe2e238..bbc828d1cd 100644 --- a/glean-core/rlb/src/test.rs +++ b/glean-core/rlb/src/test.rs @@ -1319,7 +1319,7 @@ fn configure_ping_throttling() { }) .build(); let pings_per_interval = 10; - cfg.rate_limit = Some(glean_core::PingRateLimit { + cfg.rate_limit = Some(crate::PingRateLimit { seconds_per_interval: 1, pings_per_interval, });