Skip to content

Commit 58c5a48

Browse files
authored
Rename methods in Monitor Query README (Azure#24304)
1 parent a9cbb3f commit 58c5a48

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

sdk/monitor/Azure.Monitor.Query/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ All client instance methods are thread-safe and independent of each other ([guid
8585

8686
### Logs query
8787

88-
You can query logs using the `LogsQueryClient.QueryAsync` method. The result is returned as a table with a collection of rows:
88+
You can query logs using the `LogsQueryClient.QueryWorkspaceAsync` method. The result is returned as a table with a collection of rows:
8989

9090
```C# Snippet:QueryLogsAsTable
9191
string workspaceId = "<workspace_id>";
@@ -104,7 +104,8 @@ foreach (var row in table.Rows)
104104
```
105105

106106
#### Handle logs query response
107-
The `Query` method returns the `LogsQueryResult`, while the `QueryBatch` method returns the `LogsBatchQueryResult`. Here's a hierarchy of the response:
107+
108+
The `QueryWorkspace` method returns the `LogsQueryResult`, while the `QueryBatch` method returns the `LogsBatchQueryResult`. Here's a hierarchy of the response:
108109

109110
```
110111
LogsQueryResult
@@ -122,7 +123,7 @@ LogsQueryResult
122123

123124
#### Map logs query results to a model
124125

125-
You can map logs query results to a model using the `LogsQueryClient.QueryAsync<T>` method.
126+
You can map logs query results to a model using the `LogsQueryClient.QueryWorkspaceAsync<T>` method.
126127

127128
```C# Snippet:QueryLogsAsModelsModel
128129
public class MyLogEntryModel
@@ -150,7 +151,7 @@ foreach (var logEntryModel in response.Value)
150151

151152
#### Map logs query results to a primitive
152153

153-
If your query returns a single column (or a single value) of a primitive type, use the `LogsQueryClient.QueryAsync<T>` overload to deserialize it:
154+
If your query returns a single column (or a single value) of a primitive type, use the `LogsQueryClient.QueryWorkspaceAsync<T>` overload to deserialize it:
154155

155156
```C# Snippet:QueryLogsAsPrimitive
156157
string workspaceId = "<workspace_id>";
@@ -266,7 +267,7 @@ foreach (var resourceGroup in response.Value)
266267

267268
#### Query multiple workspaces
268269

269-
To run the same query against multiple workspaces, use the `LogsQueryOptions.AdditionalWorkspaces` property:
270+
To run the same logs query against multiple workspaces, use the `LogsQueryOptions.AdditionalWorkspaces` property:
270271

271272
```C# Snippet:QueryLogsWithAdditionalWorkspace
272273
string workspaceId = "<workspace_id>";
@@ -292,7 +293,7 @@ foreach (var resourceGroup in response.Value)
292293

293294
### Metrics query
294295

295-
You can query metrics using the `MetricsQueryClient.QueryAsync` method. For every requested metric, a set of aggregated values is returned inside the `TimeSeries` collection.
296+
You can query metrics using the `MetricsQueryClient.QueryResourceAsync` method. For every requested metric, a set of aggregated values is returned inside the `TimeSeries` collection.
296297

297298
A resource ID is required to query metrics. To find the resource ID:
298299

@@ -328,7 +329,7 @@ foreach (var metric in results.Value.Metrics)
328329

329330
#### Handle metrics query response
330331

331-
The metrics query API returns a `MetricsQueryResult` object. The `MetricsQueryResult` object contains properties such as a list of `MetricResult`-typed objects, `Cost`, `Namespace`, `ResourceRegion`, `TimeSpan`, and `Interval`. The `MetricResult` objects list can be accessed using the `metrics` param. Each `MetricResult` object in this list contains a list of `MetricTimeSeriesElement` objects. Each `MetricTimeSeriesElement` object contains `Metadata` and `Values` properties.
332+
The metrics query API returns a `MetricsQueryResult` object. The `MetricsQueryResult` object contains properties such as a list of `MetricResult`-typed objects, `Cost`, `Namespace`, `ResourceRegion`, `TimeSpan`, and `Interval`. The `MetricResult` objects list can be accessed using the `metrics` param. Each `MetricResult` object in this list contains a list of `MetricTimeSeriesElement` objects. Each `MetricTimeSeriesElement` object contains `Metadata` and `Values` properties.
332333

333334
Here's a hierarchy of the response:
334335

0 commit comments

Comments
 (0)