Skip to content

Commit 156d92c

Browse files
authored
Document role requirement for multi-resource metrics queries (#29241)
React to feedback in Azure/azure-sdk-blog#479 (comment). Also apply small changes as part of a cross-language README consistency review.
1 parent f8225dd commit 156d92c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

sdk/monitor/monitor-query/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For more information, see our [support policy](https://github.com/Azure/azure-sd
3737
Install the Azure Monitor Query client library for JavaScript with npm:
3838

3939
```bash
40-
npm install @azure/monitor-query
40+
npm install --save @azure/monitor-query
4141
```
4242

4343
### Create the client
@@ -113,6 +113,8 @@ Each set of metric values is a time series with the following characteristics:
113113
- [Advanced logs query scenarios](#advanced-logs-query-scenarios)
114114
- [Set logs query timeout](#set-logs-query-timeout)
115115
- [Query multiple workspaces](#query-multiple-workspaces)
116+
- [Include statistics](#include-statistics)
117+
- [Include visualization](#include-visualization)
116118
- [Metrics query](#metrics-query)
117119
- [Handle metrics query response](#handle-metrics-query-response)
118120
- [Example of handling response](#example-of-handling-response)
@@ -122,7 +124,7 @@ Each set of metric values is a time series with the following characteristics:
122124

123125
The `LogsQueryClient` can be used to query a Log Analytics workspace using the [Kusto Query Language][kusto_query_language]. The `timespan.duration` can be specified as a string in an ISO 8601 duration format. You can use the `Durations` constants provided for some commonly used ISO 8601 durations.
124126

125-
You can query logs by workspace ID or resource ID. The result is returned as a table with a collection of rows.
127+
You can query logs by Log Analytics workspace ID or Azure resource ID. The result is returned as a table with a collection of rows.
126128

127129
#### Workspace-centric logs query
128130

@@ -841,7 +843,10 @@ Each Azure resource must reside in:
841843
- The same region as the endpoint specified when creating the client.
842844
- The same Azure subscription.
843845

844-
Furthermore, the metric namespace containing the metrics to be queried must be provided. For a list of metric namespaces, see [Supported metrics and log categories by resource type][metric_namespaces].
846+
Furthermore:
847+
848+
- The user must be authorized to read monitoring data at the Azure subscription level. For example, the [Monitoring Reader role](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles/monitor#monitoring-reader) on the subscription to be queried.
849+
- The metric namespace containing the metrics to be queried must be provided. For a list of metric namespaces, see [Supported metrics and log categories by resource type][metric_namespaces].
845850

846851
```ts
847852
let resourceIds: string[] = [

0 commit comments

Comments
 (0)