Interface InsightResult.Builder

  • Method Details

    • type

      The type of insight. FAILURE indicates a group of related failures.

      Parameters:
      type - The type of insight. FAILURE indicates a group of related failures.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      The type of insight. FAILURE indicates a group of related failures.

      Parameters:
      type - The type of insight. FAILURE indicates a group of related failures.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • name

      A generated label for the insight. The name is not an identifier and can differ between batch evaluations.

      Parameters:
      name - A generated label for the insight. The name is not an identifier and can differ between batch evaluations.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • description

      InsightResult.Builder description(String description)

      A description of the failure pattern that the insight represents.

      Parameters:
      description - A description of the failure pattern that the insight represents.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • createdAt

      InsightResult.Builder createdAt(Instant createdAt)

      The timestamp when the insight was generated.

      Parameters:
      createdAt - The timestamp when the insight was generated.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedSessionCount

      InsightResult.Builder affectedSessionCount(Integer affectedSessionCount)

      The number of distinct sessions affected by the insight.

      Parameters:
      affectedSessionCount - The number of distinct sessions affected by the insight.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sampleSessions

      InsightResult.Builder sampleSessions(Collection<SampleSession> sampleSessions)

      A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause.

      Parameters:
      sampleSessions - A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sampleSessions

      InsightResult.Builder sampleSessions(SampleSession... sampleSessions)

      A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause.

      Parameters:
      sampleSessions - A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • sampleSessions

      InsightResult.Builder sampleSessions(Consumer<SampleSession.Builder>... sampleSessions)

      A sample of up to 10 sessions affected by the insight. Returned only when the insight has no root causes. Otherwise, sample sessions are returned for each root cause.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to sampleSessions(List<SampleSession>).

      Parameters:
      sampleSessions - a consumer that will call methods on SampleSession.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • rootCauses

      The root causes identified for the insight.

      Parameters:
      rootCauses - The root causes identified for the insight.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rootCauses

      InsightResult.Builder rootCauses(InsightRootCause... rootCauses)

      The root causes identified for the insight.

      Parameters:
      rootCauses - The root causes identified for the insight.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rootCauses

      The root causes identified for the insight.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to rootCauses(List<InsightRootCause>).

      Parameters:
      rootCauses - a consumer that will call methods on InsightRootCause.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: