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

[Azure.Monitor.Query] Suppress QueryTimeRange in MetricsQueryResourcesOptions #46454

Closed
nisha-bhatia opened this issue Oct 8, 2024 · 2 comments · Fixed by #47393
Closed

[Azure.Monitor.Query] Suppress QueryTimeRange in MetricsQueryResourcesOptions #46454

nisha-bhatia opened this issue Oct 8, 2024 · 2 comments · Fixed by #47393
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Monitor - Query

Comments

@nisha-bhatia
Copy link
Member

Currently, https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/monitor/Azure.Monitor.Query/src/MetricsQueryResourcesOptions.cs#L20 MetricsQueryResourcesOptions takes in a QueryTimeRange TimeRange property.
Using this parameter is confusing as it has three parts: duration, starttime, and endtime. The service only takes in starttime and endtime so we should make TimeRange as EditorBrowseableNever and add two new properties: Starttime and Endtime.

@nisha-bhatia nisha-bhatia added Client This issue points to a problem in the data-plane of the library. Monitor - Query labels Oct 8, 2024
@nisha-bhatia nisha-bhatia self-assigned this Oct 8, 2024
@nisha-bhatia
Copy link
Member Author

With 3 parameters on QueryTimeRange, here are all the combinations and their outcomes:

  1. StartTime and EndTime not set -> service defaults to one hour
  2. StartTime specified -> service sets EndTime to be current Time
  3. StartTime and EndTime both set -> works
  4. Duration needs to be passed in (because of the QueryTimeRange constructor) but is disregarded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Monitor - Query
Projects
None yet
1 participant