Skip to content

Commit 0750943

Browse files
authored
Add more detail to Monitor Query stats & viz README sections (Azure#27484)
1 parent 8e45acb commit 0750943

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

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

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,18 @@ var queryStats = statsDoc.RootElement.GetProperty("query");
334334
Console.WriteLine(queryStats.GetProperty("executionTime").GetDouble());
335335
```
336336

337-
Because the structure of the statistics payload varies by query, a `BinaryData` return type is used. It contains the raw JSON response.
337+
Because the structure of the statistics payload varies by query, a `BinaryData` return type is used. It contains the raw JSON response. The statistics are found within the `query` property of the JSON. For example:
338+
339+
```json
340+
{
341+
"query": {
342+
"executionTime": 0.0156478,
343+
"resourceUsage": {...},
344+
"inputDatasetStatistics": {...},
345+
"datasetStatistics": [{...}]
346+
}
347+
}
348+
```
338349

339350
#### Include visualization
340351

@@ -368,7 +379,29 @@ var queryViz = vizDoc.RootElement.GetProperty("visualization");
368379
Console.WriteLine(queryViz.GetString());
369380
```
370381

371-
Because the structure of the visualization payload varies by query, a `BinaryData` return type is used. It contains the raw JSON response.
382+
Because the structure of the visualization payload varies by query, a `BinaryData` return type is used. It contains the raw JSON response. For example:
383+
384+
```json
385+
{
386+
"visualization": "columnchart",
387+
"title": null,
388+
"accumulate": false,
389+
"isQuerySorted": false,
390+
"kind": null,
391+
"legend": null,
392+
"series": null,
393+
"yMin": "",
394+
"yMax": "",
395+
"xAxis": null,
396+
"xColumn": null,
397+
"xTitle": null,
398+
"yAxis": null,
399+
"yColumns": null,
400+
"ySplit": null,
401+
"yTitle": null,
402+
"anomalyColumns": null
403+
}
404+
```
372405

373406
### Metrics query
374407

0 commit comments

Comments
 (0)