Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MetricsAdvisor] change timestamps type from Date to number #12162

Merged
merged 3 commits into from
Nov 4, 2020

Conversation

jeremymeng
Copy link
Member

@jeremymeng jeremymeng commented Oct 29, 2020

This addresses one of the Arch Board review feedback. I still keep the
timestamps in MetricSeriesData and MetricEnrichedSeriesData as Date
type because their most common usage is plotting because keeping them as Date
make it easier to use year/month/date in x-axis labels.

This fixes #11832

@@ -25,7 +25,7 @@ export interface AnomalyAlert {
createdOn?: Date;
id: string;
modifiedOn?: Date;
timestamp?: Date;
timestamp?: number;
Copy link
Member

Choose a reason for hiding this comment

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

Is this decision meant for all the packages?
(Asking for service-bus, I was hoping I'd change a "number" to "Date", but that doesn't seem like it?)

Copy link
Member Author

Choose a reason for hiding this comment

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

@bterlson suggested that a timestamp should be a number or string

@KarishmaGhiya
Copy link
Member

@jeremymeng This looks good to me. Do we need to make any updates to our samples?

@jeremymeng
Copy link
Member Author

This looks good to me. Do we need to make any updates to our samples?

I don't think we depends on the types of these properties. They are in output/result types. We only call console.log() on them in samples.

@KarishmaGhiya
Copy link
Member

@jeremymeng Do we need Changelog updates here?

@jeremymeng
Copy link
Member Author

Do we need Changelog updates here?

Done

jeremymeng and others added 3 commits November 3, 2020 16:48
This addresses one of the Arch Board review feedback. I still keep the
timestamps in MetricSeriesData and MetricEnrichedSeriesData as Date
type because their most common usage is plotting because keeping them as Date
make it easier to use year/month/date in x-axis labels.
@jeremymeng jeremymeng force-pushed the ma-use-number-for-timestamp branch from faf5c5e to 84aac0b Compare November 4, 2020 00:50
@jeremymeng jeremymeng merged commit cd14e46 into Azure:master Nov 4, 2020
@jeremymeng jeremymeng deleted the ma-use-number-for-timestamp branch November 4, 2020 21:43
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Dec 28, 2020
Swagger Linting Fix (Azure#12162)

* Fix Linting Issuing

* no message

* fix description

* add description and object back

* test to resolve model validation test

(cherry picked from commit ab273dfc0d5897683c128ee15da4babafa7a85ba)
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.

[MetricsAdvisor] use number instead of Date for timestamp properties
4 participants