Skip to content

Commit

Permalink
Bug 1841075 - re-export PingRateLimit for RLB's (#2528)
Browse files Browse the repository at this point in the history
* Bug 1828528 - add TextMetric entry to private mod.rs

* Bug 1841075 - PingRateLimit should be re-exported in RLB
  • Loading branch information
perrymcmanis144 authored Jul 11, 2023
1 parent b19fc95 commit 17f5e8c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions glean-core/rlb/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct Configuration {
/// The internal logging level.
pub log_level: Option<LevelFilter>,
/// The rate pings may be uploaded before they are throttled.
pub rate_limit: Option<glean_core::PingRateLimit>,
pub rate_limit: Option<crate::PingRateLimit>,
}

/// Configuration builder.
Expand Down Expand Up @@ -79,7 +79,7 @@ pub struct Builder {
pub log_level: Option<LevelFilter>,
/// Optional: The internal ping upload rate limit.
/// Default: `None`
pub rate_limit: Option<glean_core::PingRateLimit>,
pub rate_limit: Option<crate::PingRateLimit>,
}

impl Builder {
Expand Down
4 changes: 2 additions & 2 deletions glean-core/rlb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion glean-core/rlb/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 17f5e8c

Please sign in to comment.