Closed
Bug 1672990
Opened 5 years ago
Closed 5 years ago
RLB testing API should not require the "ping name"
Categories
(Data Platform and Tools :: Glean: SDK, defect, P1)
Data Platform and Tools
Glean: SDK
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Dexter, Assigned: Dexter)
Details
(Whiteboard: [telemetry:fog:m6])
Attachments
(1 file)
The RLB Specific metric APIs currently require users to specify the name of the store they want to check for stored value. Other language bindings automatically check in the first store specified in the send_in_pings.
We should provide the same friendly API here, too.
| Assignee | ||
Updated•5 years ago
|
Assignee: nobody → alessio.placitelli
Priority: P3 → P1
Whiteboard: [telemetry:glean-rs:m?][telemetry:fog:m6] → [telemetry:fog:m6]
| Assignee | ||
Comment 1•5 years ago
•
|
||
I think we have two choices here:
pub trait Boolean {
// Will default to returning the value from `send_in_pings[0]`
fn test_get_value(&self) -> Option<bool>;
fn test_get_value_from_store(&self, storage_name: &str) -> Option<bool>;
}
or
pub trait Boolean {
// Will return the value from `send_in_pings[0]` if `storage_name` is `None`
fn test_get_value(&self, storage_name: Option<&str>) -> Option<bool>;
}
I have a slight preference for the second option. What do you think, Jan-Erik?
Flags: needinfo?(jrediger)
Comment 2•5 years ago
|
||
Option 2 is more Rusty.
This should probably be generic to make it easier for users:
pub trait Boolean {
// Will return the value from `send_in_pings[0]` if `storage_name` is `None`
fn test_get_value<'a, S: Into<Option<&'a str>>>(&self, storage_name: S) -> Option<bool>;
}
See this example for the possibilities: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=cf67b81f9d01b892b41ec87af294a596
Flags: needinfo?(jrediger)
Comment 3•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•