Skip to main content
GitHub source

class MetricThresholdFilter

Filter that compares a metric value against a user-defined threshold.

method MetricThresholdFilter.__init__

__init__(
    name: 'str',
    agg: 'Agg | None' = None,
    window: 'int' = 1,
    cmp: 'Literal['$gte', '$gt', '$lt', '$lte']',
    threshold: 'Annotated | Annotated'
) โ†’ None
Args:
  • name (str):
  • agg (Optional[Agg]):
  • window (int):
  • cmp (Literal[โ€˜gteโ€ฒ,โ€ฒgte', 'gtโ€™, โ€˜ltโ€ฒ,โ€ฒlt', 'lteโ€™]): Comparison operator between the metric value (left) vs. the threshold (right).
  • threshold (Union[Annotated, Annotated]):
Returns: An MetricThresholdFilter object.