Skip to content

[MetricsAdvisor] API design and renaming updates - #16732

Merged
samvaity merged 9 commits into
Azure:masterfrom
samvaity:api-updates
Nov 5, 2020
Merged

[MetricsAdvisor] API design and renaming updates #16732
samvaity merged 9 commits into
Azure:masterfrom
samvaity:api-updates

Conversation

@samvaity

Copy link
Copy Markdown
Member

This PR

  • Updated createdDataFeed method to take one DataFeed object.
  • Renamed listValuesOfDimensionWithAnomalies method to listDimensionValuesWithAnomalies.
  • Renamed model ListValuesOfDimensionWithAnomaliesOptions method to ListDimensionValuesWithAnomaliesOptions.
  • Renamed properties viewers , admins and their accessors to viewerEmails and adminEmails respectively on
    DataFeedOptions model.
  • Renamed model DataSourceMissingDataPointFillType to DataFeedMissingDataPointFillType.
  • Renamed properties on MetricEnrichedSeriesData and MetricSeriesData model.
  • Renamed method setSeverity to setSeverityRangeCondition on MetricAnomalyAlertConditions model.

Since this PR was getting too long, updates coming in follow up PR:

  • Update models to take required constructor args
  • More renames

@samvaity
samvaity requested a review from anuchandy as a code owner October 23, 2020 04:55
@samvaity samvaity self-assigned this Oct 23, 2020
@samvaity

Copy link
Copy Markdown
Member Author

Oh I need to fix the test pipeline first, will merge after #16213

@samvaity
samvaity marked this pull request as draft October 26, 2020 08:21
@samvaity
samvaity force-pushed the api-updates branch 2 times, most recently from 41e409c to a66fa4b Compare November 2, 2020 03:46

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to do a null check for params in this method as well? Today if a user calls listIncidentRootCases(null, incidentId,..) the error we throw is incident.detectionConfigurationId is required and cannot be null

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, updated.

@samvaity
samvaity marked this pull request as ready for review November 4, 2020 01:49
A `data feed` is what Metrics Advisor ingests from the user-specified data source such as Cosmos structure stream, SQL query result, and so on.
A data feed contains rows of timestamps, zero or more dimensions, one or more metrics. Therefore, multiple metrics could share the same data source and even the same data feed.
A data feed is what Metrics Advisor ingests from the user-specified data source such as Cosmos structure stream, SQL query result, and so on.
It contains rows of timestamps, zero or more dimensions, one or more etrics. Therefore, multiple metrics could share the same data source and even the same data feed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit; one or more etrics -> one or more metrics

.setStartTime(startTime)
.setEndTime(endTime);

if (options.getFilter() != null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we also check for whether the option is not null before invoking getFilter

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment for listAnomaliesForDetectionConfigNextPageAsync

@samvaity
samvaity merged commit 2383dfc into Azure:master Nov 5, 2020
@samvaity
samvaity deleted the api-updates branch June 22, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants