-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prototype exposure aggregation (#222)
For non analytics gates, we need to be able to aggregate exposures and batch up counts per group, rather than send an entire event for every check. This adds that functionality to the logger Still todo - send down the type of gate in d_c_s, and use that to determine whether to aggregate the exposures for a given check or not - the logger class now has a parameter for that, we just need to pipe it through --------- Co-authored-by: Brent Echols <[email protected]> Co-authored-by: Stephen Royal <[email protected]>
- Loading branch information
1 parent
9feaf07
commit e9b8684
Showing
5 changed files
with
77 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from dataclasses import dataclass | ||
from typing import Optional | ||
|
||
@dataclass | ||
class ExposureAggregationData: | ||
gate: Optional[str] = None | ||
rule_id: Optional[str] = None | ||
value: Optional[bool] = None | ||
count: int = 0 | ||
|
||
def to_dict(self): | ||
return { | ||
"gate": self.gate, | ||
"rule_id": self.rule_id, | ||
"value": self.value, | ||
"count": self.count, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters