You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -101,6 +103,23 @@ foreach (var row in table.Rows)
101
103
}
102
104
```
103
105
106
+
#### 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:
108
+
109
+
```
110
+
LogsQueryResult
111
+
|---Error
112
+
|---Status
113
+
|---Table
114
+
|---Name
115
+
|---Columns (list of `LogsTableColumn` objects)
116
+
|---Name
117
+
|---Type
118
+
|---Rows (list of `LogsTableRows` objects)
119
+
|---Count
120
+
|---AllTables (list of `LogsTable` objects)
121
+
```
122
+
104
123
#### Map logs query results to a model
105
124
106
125
You can map logs query results to a model using the `LogsQueryClient.QueryAsync<T>` method.
@@ -307,6 +326,31 @@ foreach (var metric in results.Value.Metrics)
307
326
}
308
327
```
309
328
329
+
#### Handle metrics query response
330
+
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
+
333
+
Here's a hierarchy of the response:
334
+
335
+
```
336
+
MetricsQueryResult
337
+
|---Cost
338
+
|---Interval
339
+
|---Namespace
340
+
|---ResourceRegion
341
+
|---TimeSpan
342
+
|---Metrics (list of `MetricResult` objects)
343
+
|---Id
344
+
|---Type
345
+
|---Name
346
+
|---DisplayDescription
347
+
|---Error
348
+
|---Unit
349
+
|---TimeSeries (list of `MetricTimeSeriesElement` objects)
0 commit comments