MetricsAdvisorClient.listFeedback Method

Definition

Overloads

listFeedback(String metricId)

List information of all metric feedbacks on the metrics advisor account.

Code sample

final String metricId = "d3gh4i4-b804-4ab9-a70f-0da0c89cft3l";
 metricsAdvisorClient.listFeedback(metricId)
     .forEach(metricFeedback -> {
         System.out.printf("Data Feed Metric feedback Id: %s%n", metricFeedback.getId());
         System.out.printf("Data Feed Metric feedback associated dimension filter: %s%n",
             metricFeedback.getDimensionFilter().asMap());
 
         if (PERIOD.equals(metricFeedback.getFeedbackType())) {
             MetricPeriodFeedback periodFeedback
                 = (MetricPeriodFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback type: %s%n",
                 periodFeedback.getPeriodType().toString());
             System.out.printf("Data Feed Metric feedback period value: %f%n",
                 periodFeedback.getPeriodValue());
         } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {
             MetricAnomalyFeedback metricAnomalyFeedback
                 = (MetricAnomalyFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback anomaly value: %s%n",
                 metricAnomalyFeedback.getAnomalyValue().toString());
             System.out.printf("Data Feed Metric feedback associated detection configuration: %s%n",
                 metricAnomalyFeedback.getDetectionConfigurationId());
         } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {
             MetricCommentFeedback metricCommentFeedback
                 = (MetricCommentFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback comment value: %s%n",
                 metricCommentFeedback.getComment());
         }
     });
listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)

List information of all metric feedbacks on the metrics advisor account.

Code sample

final String metricId = "d3gh4i4-b804-4ab9-a70f-0da0c89cft3l";
 final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-01T00:00:00Z");
 final OffsetDateTime endTime = OffsetDateTime.parse("2020-09-09T00:00:00Z");
 
 metricsAdvisorClient.listFeedback(metricId,
     new ListMetricFeedbackOptions()
         .setFilter(new ListMetricFeedbackFilter()
             .setStartTime(startTime)
             .setTimeMode(FeedbackQueryTimeMode.FEEDBACK_CREATED_TIME)
             .setEndTime(endTime)), Context.NONE)
     .forEach(metricFeedback -> {
         System.out.printf("Data Feed Metric feedback Id: %s%n", metricFeedback.getId());
         System.out.printf("Data Feed Metric feedback associated dimension filter: %s%n",
             metricFeedback.getDimensionFilter().asMap());
         System.out.printf("Data Feed Metric feedback created time %s%n", metricFeedback.getCreatedTime());
 
         if (PERIOD.equals(metricFeedback.getFeedbackType())) {
             MetricPeriodFeedback periodFeedback
                 = (MetricPeriodFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback type: %s%n",
                 periodFeedback.getPeriodType().toString());
             System.out.printf("Data Feed Metric feedback period value: %f%n",
                 periodFeedback.getPeriodValue());
         } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {
             MetricAnomalyFeedback metricAnomalyFeedback
                 = (MetricAnomalyFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback anomaly value: %s%n",
                 metricAnomalyFeedback.getAnomalyValue().toString());
             System.out.printf("Data Feed Metric feedback associated detection configuration: %s%n",
                 metricAnomalyFeedback.getDetectionConfigurationId());
         } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {
             MetricCommentFeedback metricCommentFeedback
                 = (MetricCommentFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback comment value: %s%n",
                 metricCommentFeedback.getComment());
         }
     });

listFeedback(String metricId)

List information of all metric feedbacks on the metrics advisor account.

Code sample

final String metricId = "d3gh4i4-b804-4ab9-a70f-0da0c89cft3l";
 metricsAdvisorClient.listFeedback(metricId)
     .forEach(metricFeedback -> {
         System.out.printf("Data Feed Metric feedback Id: %s%n", metricFeedback.getId());
         System.out.printf("Data Feed Metric feedback associated dimension filter: %s%n",
             metricFeedback.getDimensionFilter().asMap());
 
         if (PERIOD.equals(metricFeedback.getFeedbackType())) {
             MetricPeriodFeedback periodFeedback
                 = (MetricPeriodFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback type: %s%n",
                 periodFeedback.getPeriodType().toString());
             System.out.printf("Data Feed Metric feedback period value: %f%n",
                 periodFeedback.getPeriodValue());
         } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {
             MetricAnomalyFeedback metricAnomalyFeedback
                 = (MetricAnomalyFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback anomaly value: %s%n",
                 metricAnomalyFeedback.getAnomalyValue().toString());
             System.out.printf("Data Feed Metric feedback associated detection configuration: %s%n",
                 metricAnomalyFeedback.getDetectionConfigurationId());
         } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {
             MetricCommentFeedback metricCommentFeedback
                 = (MetricCommentFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback comment value: %s%n",
                 metricCommentFeedback.getComment());
         }
     });
public PagedIterable<MetricFeedback> listFeedback(String metricId)

Parameters

metricId
java.lang.String

the unique metric Id.

Returns

A PagedIterable<T> containing information of all the MetricFeedback in the account.

listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)

List information of all metric feedbacks on the metrics advisor account.

Code sample

final String metricId = "d3gh4i4-b804-4ab9-a70f-0da0c89cft3l";
 final OffsetDateTime startTime = OffsetDateTime.parse("2020-01-01T00:00:00Z");
 final OffsetDateTime endTime = OffsetDateTime.parse("2020-09-09T00:00:00Z");
 
 metricsAdvisorClient.listFeedback(metricId,
     new ListMetricFeedbackOptions()
         .setFilter(new ListMetricFeedbackFilter()
             .setStartTime(startTime)
             .setTimeMode(FeedbackQueryTimeMode.FEEDBACK_CREATED_TIME)
             .setEndTime(endTime)), Context.NONE)
     .forEach(metricFeedback -> {
         System.out.printf("Data Feed Metric feedback Id: %s%n", metricFeedback.getId());
         System.out.printf("Data Feed Metric feedback associated dimension filter: %s%n",
             metricFeedback.getDimensionFilter().asMap());
         System.out.printf("Data Feed Metric feedback created time %s%n", metricFeedback.getCreatedTime());
 
         if (PERIOD.equals(metricFeedback.getFeedbackType())) {
             MetricPeriodFeedback periodFeedback
                 = (MetricPeriodFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback type: %s%n",
                 periodFeedback.getPeriodType().toString());
             System.out.printf("Data Feed Metric feedback period value: %f%n",
                 periodFeedback.getPeriodValue());
         } else if (ANOMALY.equals(metricFeedback.getFeedbackType())) {
             MetricAnomalyFeedback metricAnomalyFeedback
                 = (MetricAnomalyFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback anomaly value: %s%n",
                 metricAnomalyFeedback.getAnomalyValue().toString());
             System.out.printf("Data Feed Metric feedback associated detection configuration: %s%n",
                 metricAnomalyFeedback.getDetectionConfigurationId());
         } else if (COMMENT.equals(metricFeedback.getFeedbackType())) {
             MetricCommentFeedback metricCommentFeedback
                 = (MetricCommentFeedback) metricFeedback;
             System.out.printf("Data Feed Metric feedback comment value: %s%n",
                 metricCommentFeedback.getComment());
         }
     });
public PagedIterable<MetricFeedback> listFeedback(String metricId, ListMetricFeedbackOptions options, Context context)

Parameters

metricId
java.lang.String

the unique metric Id.

options
ListMetricFeedbackOptions

The configurable ListMetricFeedbackOptions to pass for filtering the output result.

context
Context

Additional context that is passed through the HTTP pipeline during the service call.

Returns

A PagedIterable<T> containing information of all the MetricFeedback in the account.

Applies to