Server Knobs: Invert the `disabled` parameter in the Server Knobs API to reduce confusion
Categories
(Data Platform and Tools :: Glean: SDK, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: travis_, Assigned: travis_)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Since the Glean metrics property is actually disabled defaulting to false rather than enabled with a default of true, this creates Server Knobs feature configurations that look like "category.name": true in order to disable a metric.
If this were inverted in the API so that instead we were passing in the enabled state of the metric, it would be much less confusing
Comment 1•2 years ago
|
||
The part of me that completed that part of that Software Engineer program I started in University is telling me that, instead of inverting it, we should make it an enum like
{
"category.name": Disabled,
}
Then if we want to expand the expressiveness of the system, we have an obvious path forward.
Of course, this is JSON so we're stuck with its inexpressiveness (no enums). So maybe complicating things isn't warranted:
{
"category.name": {
"disabled": false,
"sample": 0.1
}
}
But I do kinda like the look of it.
| Assignee | ||
Updated•2 years ago
|
Comment 2•2 years ago
|
||
| Assignee | ||
Comment 3•2 years ago
|
||
I'm going to take :chutten's idea and refile it as an enhancement. I do like that as an improvement but I'm doing a simple change now to flip this and will look at improvements to the feature surface in a future iteration.
Description
•