Interface Anomaly.Builder

    • Method Detail

      • instances

        Anomaly.Builder instances​(Collection<AnomalyInstance> instances)

        A list of the instances of the detected anomalies during the requested period.

        Parameters:
        instances - A list of the instances of the detected anomalies during the requested period.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • instances

        Anomaly.Builder instances​(AnomalyInstance... instances)

        A list of the instances of the detected anomalies during the requested period.

        Parameters:
        instances - A list of the instances of the detected anomalies during the requested period.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • metric

        Anomaly.Builder metric​(Metric metric)

        Details about the metric that the analysis used when it detected the anomaly. The metric includes the name of the frame that was analyzed with the type and thread states used to derive the metric value for that frame.

        Parameters:
        metric - Details about the metric that the analysis used when it detected the anomaly. The metric includes the name of the frame that was analyzed with the type and thread states used to derive the metric value for that frame.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • metric

        default Anomaly.Builder metric​(Consumer<Metric.Builder> metric)

        Details about the metric that the analysis used when it detected the anomaly. The metric includes the name of the frame that was analyzed with the type and thread states used to derive the metric value for that frame.

        This is a convenience method that creates an instance of the Metric.Builder avoiding the need to create one manually via Metric.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to metric(Metric).

        Parameters:
        metric - a consumer that will call methods on Metric.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        metric(Metric)
      • reason

        Anomaly.Builder reason​(String reason)

        The reason for which metric was flagged as anomalous.

        Parameters:
        reason - The reason for which metric was flagged as anomalous.
        Returns:
        Returns a reference to this object so that method calls can be chained together.