Created
July 11, 2022 17:55
-
-
Save ramannanda9/eaeae4292a959c4b25037d6e52d0816a to your computer and use it in GitHub Desktop.
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
class MetricsProvider(abc.ABC): | |
@abc.abstractmethod | |
def name(): | |
pass | |
@abc.abstractmethod | |
def fetch_metrics(tags:Dict[str,str], strategy: Strategy)->Dict[str, Metric]: | |
#should fetch metrics, combination happens on server side as per strategy i.e. rolling average to reduce load in data transfer | |
pass | |
@abc.abstractmethod | |
def append_metrics(tags: Dict[str, str], values: Union[Any, pd.Series]) -> None: | |
#provider responsible for storing metrics on the values | |
pass | |
class Metric(abc.ABC): | |
@abc.abstractmethod | |
def name(): | |
pass | |
def to_summary()->Dict[str, Any]: | |
pass | |
class DistributionMetric(abc.ABC): | |
..... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment