From e5b6f10693a34a08933291f968b018cfacfd1d3d Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Mon, 16 Aug 2021 16:47:52 -0700 Subject: [PATCH 1/8] More Reanaming in query --- sdk/monitor/azure-monitor-query/README.md | 4 ++-- .../monitor/query/_metrics_query_client.py | 10 +++++---- .../azure/monitor/query/_models.py | 21 ++++++++++++++----- .../query/aio/_metrics_query_client_async.py | 10 +++++---- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/sdk/monitor/azure-monitor-query/README.md b/sdk/monitor/azure-monitor-query/README.md index 336a887da4e5..a87aa1ae263d 100644 --- a/sdk/monitor/azure-monitor-query/README.md +++ b/sdk/monitor/azure-monitor-query/README.md @@ -289,11 +289,11 @@ for metric in response.metrics: ### Handle metrics response -The metrics query API returns a `MetricsResult` object. The `MetricsResult` object contains properties such as a list of `Metric`-typed objects, `interval`, `namespace`, and `timespan`. The `Metric` objects list can be accessed using the `metrics` param. Each `Metric` object in this list contains a list of `TimeSeriesElement` objects. Each `TimeSeriesElement` contains `data` and `metadata_values` properties. In visual form, the object hierarchy of the response resembles the following structure: +The metrics query API returns a `MetricsResult` object. The `MetricsResult` object contains properties such as a list of `Metric`-typed objects, `granularity`, `namespace`, and `timespan`. The `Metric` objects list can be accessed using the `metrics` param. Each `Metric` object in this list contains a list of `TimeSeriesElement` objects. Each `TimeSeriesElement` contains `data` and `metadata_values` properties. In visual form, the object hierarchy of the response resembles the following structure: ``` MetricsResult -|---interval +|---granularity |---timespan |---cost |---namespace diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_metrics_query_client.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_metrics_query_client.py index 0b45d1bc10b3..e63e04832b21 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_metrics_query_client.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_metrics_query_client.py @@ -68,8 +68,8 @@ def query(self, resource_uri, metric_names, **kwargs): a timedelta and a start datetime, or a start datetime/end datetime. :paramtype timespan: ~datetime.timedelta or tuple[~datetime.datetime, ~datetime.timedelta] or tuple[~datetime.datetime, ~datetime.datetime] - :keyword interval: The interval (i.e. timegrain) of the query. - :paramtype interval: ~datetime.timedelta + :keyword granularity: The granularity (i.e. timegrain) of the query. + :paramtype granularity: ~datetime.timedelta :keyword aggregations: The list of aggregation types to retrieve. Use `azure.monitor.query.AggregationType` enum to get each aggregation type. :paramtype aggregations: list[str] @@ -77,10 +77,10 @@ def query(self, resource_uri, metric_names, **kwargs): Valid only if $filter is specified. Defaults to 10. :paramtype max_results: int - :keyword orderby: The aggregation to use for sorting results and the direction of the sort. + :keyword order_by: The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. - :paramtype orderby: str + :paramtype order_by: str :keyword filter: The **$filter** is used to reduce the set of metric data returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and @@ -117,6 +117,8 @@ def query(self, resource_uri, metric_names, **kwargs): kwargs.setdefault("metricnames", ",".join(metric_names)) kwargs.setdefault("timespan", timespan) kwargs.setdefault("top", kwargs.pop("max_results", None)) + kwargs.setdefault("interval", kwargs.pop("granularity", None)) + kwargs.setdefault("orderby", kwargs.pop("order_by", None)) generated = self._metrics_op.list(resource_uri, connection_verify=False, **kwargs) return MetricsResult._from_generated(generated) # pylint: disable=protected-access diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index 400f9f19f04a..4bcf358d0041 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -9,6 +9,8 @@ import uuid from typing import Any, Optional, List +from azure.core.exceptions import HttpResponseError + from ._helpers import construct_iso8601 from ._generated.models import ( Column as InternalColumn, @@ -115,10 +117,10 @@ class MetricsResult(object): two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. :vartype timespan: str - :ivar interval: The interval (window size) for which the metric data was returned in. This + :ivar granularity: The granularity (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. - :vartype interval: ~datetime.timedelta + :vartype granularity: ~datetime.timedelta :ivar namespace: The namespace of the metrics that has been queried. :vartype namespace: str :ivar resource_region: The region of the resource that has been queried for metrics. @@ -130,7 +132,7 @@ def __init__(self, **kwargs): # type: (Any) -> None self.cost = kwargs.get("cost", None) self.timespan = kwargs["timespan"] - self.interval = kwargs.get("interval", None) + self.granularity = kwargs.get("granularity", None) self.namespace = kwargs.get("namespace", None) self.resource_region = kwargs.get("resource_region", None) self.metrics = kwargs["metrics"] @@ -142,7 +144,7 @@ def _from_generated(cls, generated): return cls( cost=generated.cost, timespan=generated.timespan, - interval=generated.interval, + granularity=generated.interval, namespace=generated.namespace, resource_region=generated.resourceregion, metrics=[Metric._from_generated(m) for m in generated.value] # pylint: disable=protected-access @@ -459,6 +461,10 @@ class Metric(object): :vartype unit: str :ivar timeseries: Required. The time series returned when a data query is performed. :vartype timeseries: list[~monitor_query_client.models.TimeSeriesElement] + :ivar display_description: Detailed description of this metric. + :vartype display_description: str + :ivar error: Error message encountered querying this specific metric. + :vartype error: str """ def __init__( self, @@ -470,6 +476,9 @@ def __init__( self.name = kwargs['name'] self.unit = kwargs['unit'] self.timeseries = kwargs['timeseries'] + self.display_description = kwargs['display_description'] + self.error = kwargs['error'] + self.error_message = kwargs['error_message'] @classmethod def _from_generated(cls, generated): @@ -482,7 +491,9 @@ def _from_generated(cls, generated): unit=generated.unit, timeseries=[ TimeSeriesElement._from_generated(t) for t in generated.timeseries # pylint: disable=protected-access - ] + ], + display_desription=generated.display_description, + error=HttpResponseError(messgae=generated.error_message) if generated.error_message else None, ) diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_metrics_query_client_async.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_metrics_query_client_async.py index 69da6544cb8c..f1a772c1df7d 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_metrics_query_client_async.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/aio/_metrics_query_client_async.py @@ -62,8 +62,8 @@ async def query( a timedelta and a start datetime, or a start datetime/end datetime. :paramtype timespan: ~datetime.timedelta or tuple[~datetime.datetime, ~datetime.timedelta] or tuple[~datetime.datetime, ~datetime.datetime] - :keyword interval: The interval (i.e. timegrain) of the query. - :paramtype interval: ~datetime.timedelta + :keyword granularity: The interval (i.e. timegrain) of the query. + :paramtype granularity: ~datetime.timedelta :keyword aggregations: The list of aggregation types to retrieve. Use `azure.monitor.query.AggregationType` enum to get each aggregation type. :paramtype aggregations: list[str] @@ -71,10 +71,10 @@ async def query( Valid only if $filter is specified. Defaults to 10. :paramtype max_results: int - :keyword orderby: The aggregation to use for sorting results and the direction of the sort. + :keyword order_by: The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc. - :paramtype orderby: str + :paramtype order_by: str :keyword filter: The **$filter** is used to reduce the set of metric data returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and @@ -98,6 +98,8 @@ async def query( kwargs.setdefault("metricnames", ",".join(metric_names)) kwargs.setdefault("timespan", timespan) kwargs.setdefault("top", kwargs.pop("max_results", None)) + kwargs.setdefault("interval", kwargs.pop("granularity", None)) + kwargs.setdefault("orderby", kwargs.pop("order_by", None)) aggregations = kwargs.pop("aggregations", None) if aggregations: kwargs.setdefault("aggregation", ",".join(aggregations)) From 0cefb204ee29a86657162f35047e227bd8e1f83e Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Mon, 16 Aug 2021 16:49:59 -0700 Subject: [PATCH 2/8] changelog --- sdk/monitor/azure-monitor-query/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md index 11fa24cf682f..0eb98dcc8f73 100644 --- a/sdk/monitor/azure-monitor-query/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Added addition `display_description` and `error` attributes to the `Metric` type. + ### Breaking Changes - Rename `batch_query` to `query_batch`. @@ -16,6 +18,8 @@ - `metric_namespace_name` is renamed to `fully_qualified_namespace` - `is_dimension_required` is renamed to `dimension_required` - `time_grain` is renamed to `granularity` +- `interval` is renamed to `granularity` +- `orderby` is renamed to `order_by` ### Bugs Fixed From 6451cc7a59cfa7e94c3dd40028ab81d4f4628293 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Tue, 17 Aug 2021 16:59:16 -0700 Subject: [PATCH 3/8] commit 2 --- .../azure/monitor/query/_models.py | 3 +-- .../samples/sample_log_query_client.py | 20 +++++++++++++------ .../samples/sample_metric_namespaces.py | 4 ++-- .../samples/sample_metrics_query_client.py | 7 +++---- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index 4bcf358d0041..d843eb5846c7 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -478,7 +478,6 @@ def __init__( self.timeseries = kwargs['timeseries'] self.display_description = kwargs['display_description'] self.error = kwargs['error'] - self.error_message = kwargs['error_message'] @classmethod def _from_generated(cls, generated): @@ -492,7 +491,7 @@ def _from_generated(cls, generated): timeseries=[ TimeSeriesElement._from_generated(t) for t in generated.timeseries # pylint: disable=protected-access ], - display_desription=generated.display_description, + display_description=generated.display_description, error=HttpResponseError(messgae=generated.error_message) if generated.error_message else None, ) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_log_query_client.py b/sdk/monitor/azure-monitor-query/samples/sample_log_query_client.py index d9457b6d4b66..fd2d13a4b891 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_log_query_client.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_log_query_client.py @@ -20,18 +20,26 @@ query = """AppRequests | summarize avgRequestDuration=avg(DurationMs) by bin(TimeGenerated, 10m), _ResourceId""" +query = """ +AppRequests +| where TimeGenerated > ago(1h) +| fork + ( summarize avgRequestDuration=avg(DurationMs) by bin(TimeGenerated, 10m), _ResourceId ) +""" + # returns LogsQueryResult response = client.query(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if not response.tables: print("No results for the query") -try: - table = response.tables[0] - df = pd.DataFrame(table.rows, columns=[col.name for col in table.columns]) - print(df) -except TypeError: - print(response.error) +for table in response.tables: + try: + print ([col.name for col in table.columns]) + df = pd.DataFrame(table.rows, columns=[col.name for col in table.columns]) + print(df) + except TypeError: + print(response.error) # [END send_logs_query] """ TimeGenerated _ResourceId avgRequestDuration diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py index f5f32ce73996..e713317ff871 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py @@ -9,9 +9,9 @@ client = MetricsQueryClient(credential) -metrics_uri = os.environ['METRICS_RESOURCE_URI'] +metrics_uri = '/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/sabhyrav-resourcegroup/providers/Microsoft.EventGrid/topics/rakshith-cloud' response = client.list_metric_namespaces(metrics_uri) for item in response: - print(item.metric_namespace_name) + print(item.fully_qualified_namespace) print(item.type) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py index 7bca1ab1aa24..ce0e3e62c7f7 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py @@ -16,12 +16,11 @@ # [END metrics_client_auth_with_token_cred] # [START send_metrics_query] -metrics_uri = os.environ['METRICS_RESOURCE_URI'] +metrics_uri = "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/sabhyrav-resourcegroup/providers/Microsoft.EventGrid/topics/rakshith-cloud" response = client.query( metrics_uri, - metric_names=["MatchedEventCount"], - start_time=datetime(2021, 6, 21), - duration=timedelta(days=1), + metric_names=["MatchedEventCount", "DeliverySuccesssCount"], + timespan=timedelta(days=1), aggregations=[AggregationType.COUNT] ) From 1b3abd2bc771c7393eb2d1c8367eaf45c3fc3562 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Aug 2021 15:57:34 -0700 Subject: [PATCH 4/8] some changes --- .../azure/monitor/query/_models.py | 7 +++++-- .../samples/sample_metric_namespaces.py | 2 +- .../samples/sample_metrics_query_client.py | 2 +- .../tests/async/test_metrics_client_async.py | 16 ++++++++++++++++ .../tests/test_metrics_client.py | 14 ++++++++++++++ 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index d843eb5846c7..c1c5fdc394b4 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -464,7 +464,7 @@ class Metric(object): :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar error: Error message encountered querying this specific metric. - :vartype error: str + :vartype error: ~azure.core.exceptions.HttpResponseError """ def __init__( self, @@ -483,6 +483,9 @@ def __init__( def _from_generated(cls, generated): if not generated: return cls() + error = None + if generated.error_message: + error = HttpResponseError(message=generated.error_message) return cls( id=generated.id, type=generated.type, @@ -492,7 +495,7 @@ def _from_generated(cls, generated): TimeSeriesElement._from_generated(t) for t in generated.timeseries # pylint: disable=protected-access ], display_description=generated.display_description, - error=HttpResponseError(messgae=generated.error_message) if generated.error_message else None, + error= error, ) diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py index e713317ff871..78b997d0fa7f 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py @@ -9,7 +9,7 @@ client = MetricsQueryClient(credential) -metrics_uri = '/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/sabhyrav-resourcegroup/providers/Microsoft.EventGrid/topics/rakshith-cloud' +metrics_uri = os.environ['METRICS_RESOURCE_URI'] response = client.list_metric_namespaces(metrics_uri) for item in response: diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py index ce0e3e62c7f7..15c6dcbdf157 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query_client.py @@ -16,7 +16,7 @@ # [END metrics_client_auth_with_token_cred] # [START send_metrics_query] -metrics_uri = "/subscriptions/faa080af-c1d8-40ad-9cce-e1a450ca5b57/resourceGroups/sabhyrav-resourcegroup/providers/Microsoft.EventGrid/topics/rakshith-cloud" +metrics_uri = os.environ['METRICS_RESOURCE_URI'] response = client.query( metrics_uri, metric_names=["MatchedEventCount", "DeliverySuccesssCount"], diff --git a/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py b/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py index fb76a4f4d7ea..ab796d7d0924 100644 --- a/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py +++ b/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py @@ -14,6 +14,7 @@ def _credential(): return credential @pytest.mark.live_test_only +@pytest.mark.asyncio async def test_metrics_auth(): credential = _credential() client = MetricsQueryClient(credential) @@ -26,6 +27,21 @@ async def test_metrics_auth(): assert response assert response.metrics +@pytest.mark.live_test_only +@pytest.mark.asyncio +async def test_metrics_granularity(): + credential = _credential() + client = MetricsQueryClient(credential) + response = await client.query( + os.environ['METRICS_RESOURCE_URI'], + metric_names=["MatchedEventCount"], + timespan=timedelta(days=1), + granularity=timedelta(minutes=5), + aggregations=[AggregationType.COUNT] + ) + assert response + assert response.granularity == timedelta(minutes=5) + @pytest.mark.live_test_only async def test_metrics_namespaces(): client = MetricsQueryClient(_credential()) diff --git a/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py b/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py index 95ee209b6775..082da65c4385 100644 --- a/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py +++ b/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py @@ -25,6 +25,20 @@ def test_metrics_auth(): assert response assert response.metrics +@pytest.mark.live_test_only +def test_metrics_granularity(): + credential = _credential() + client = MetricsQueryClient(credential) + response = client.query( + os.environ['METRICS_RESOURCE_URI'], + metric_names=["MatchedEventCount"], + timespan=timedelta(days=1), + granularity=timedelta(minutes=5), + aggregations=[AggregationType.COUNT] + ) + assert response + assert response.granularity == timedelta(minutes=5) + @pytest.mark.live_test_only def test_metrics_namespaces(): client = MetricsQueryClient(_credential()) From 123437575d252b4b3c0a10faceb6cc3b1e60c53d Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Aug 2021 16:23:44 -0700 Subject: [PATCH 5/8] remove errror --- sdk/monitor/azure-monitor-query/CHANGELOG.md | 2 +- .../azure-monitor-query/azure/monitor/query/_models.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md index 0eb98dcc8f73..1a90ea34454c 100644 --- a/sdk/monitor/azure-monitor-query/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md @@ -4,7 +4,7 @@ ### Features Added -- Added addition `display_description` and `error` attributes to the `Metric` type. +- Added addition `display_description` attribute to the `Metric` type. ### Breaking Changes diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index c1c5fdc394b4..284c10672559 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -463,8 +463,6 @@ class Metric(object): :vartype timeseries: list[~monitor_query_client.models.TimeSeriesElement] :ivar display_description: Detailed description of this metric. :vartype display_description: str - :ivar error: Error message encountered querying this specific metric. - :vartype error: ~azure.core.exceptions.HttpResponseError """ def __init__( self, @@ -477,15 +475,11 @@ def __init__( self.unit = kwargs['unit'] self.timeseries = kwargs['timeseries'] self.display_description = kwargs['display_description'] - self.error = kwargs['error'] @classmethod def _from_generated(cls, generated): if not generated: return cls() - error = None - if generated.error_message: - error = HttpResponseError(message=generated.error_message) return cls( id=generated.id, type=generated.type, From 5ccceccbac06db4eca0c937fbfaaf271eccb9da3 Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Aug 2021 17:04:09 -0700 Subject: [PATCH 6/8] Update sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py --- sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index efaef3506c4b..ebdb22a614f2 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -487,7 +487,6 @@ def _from_generated(cls, generated): TimeSeriesElement._from_generated(t) for t in generated.timeseries # pylint: disable=protected-access ], display_description=generated.display_description, - error= error, ) From 9ff0a8c3fa63ef5ea985865754192a42b38b43be Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Aug 2021 17:52:01 -0700 Subject: [PATCH 7/8] Apply suggestions from code review Co-authored-by: Adam Ling (MSFT) --- sdk/monitor/azure-monitor-query/CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md index 1abdefbe8f27..0ab4e6aec01b 100644 --- a/sdk/monitor/azure-monitor-query/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md @@ -4,7 +4,7 @@ ### Features Added -- Added addition `display_description` attribute to the `Metric` type. +- Added additional `display_description` attribute to the `Metric` type. ### Breaking Changes @@ -18,7 +18,7 @@ - `metric_namespace_name` is renamed to `fully_qualified_namespace` - `is_dimension_required` is renamed to `dimension_required` - `time_grain` is renamed to `granularity` -- `interval` is renamed to `granularity` +- `interval` and `time_grain` are renamed to `granularity` - `orderby` is renamed to `order_by` - `LogsQueryResult` now returns `datetime` objects for a time values. From f892bc441407a294b8b333a4a98bc5587d0bb2ee Mon Sep 17 00:00:00 2001 From: Rakshith Bhyravabhotla Date: Thu, 19 Aug 2021 17:55:27 -0700 Subject: [PATCH 8/8] Update sdk/monitor/azure-monitor-query/CHANGELOG.md --- sdk/monitor/azure-monitor-query/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md index 0ab4e6aec01b..94a92b8cc700 100644 --- a/sdk/monitor/azure-monitor-query/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md @@ -17,7 +17,6 @@ - `top` is renamed to `max_results` in the metric's `query` API. - `metric_namespace_name` is renamed to `fully_qualified_namespace` - `is_dimension_required` is renamed to `dimension_required` -- `time_grain` is renamed to `granularity` - `interval` and `time_grain` are renamed to `granularity` - `orderby` is renamed to `order_by` - `LogsQueryResult` now returns `datetime` objects for a time values.