Skip to content

Commit 6878e8f

Browse files
author
Rakshith Bhyravabhotla
authored
Minor changes in docs (Azure#20016)
* Renames _log_query_client * minor readme fix
1 parent 8926a2f commit 6878e8f

File tree

5 files changed

+18
-14
lines changed

5 files changed

+18
-14
lines changed

sdk/monitor/azure-monitor-query/README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,18 +147,6 @@ for table in response.tables:
147147
print(df)
148148
```
149149

150-
#### Query multiple workspaces
151-
152-
The `additional_workspaces` parameter can be used to pass a list of workspaces that are included in the query when querying a single query over multiple workspaces. The parameter's list items can be qualified workspace names, workspace IDs, or Azure resource IDs. A primary workspace ID must be provided when querying multiple workspaces, as in the following example:
153-
154-
```python
155-
client.query(
156-
<primary_workspace_id>,
157-
query,
158-
additional_workspaces=['<workspace 1>', '<workspace 2>']
159-
)
160-
```
161-
162150
#### Set logs query timeout
163151

164152
The following example shows setting a server timeout in seconds. A gateway timeout is raised if the query takes more time than the mentioned timeout. The default is 180 seconds and can be set up to 10 minutes (600 seconds).
@@ -313,6 +301,22 @@ for metric in response.metrics:
313301
)
314302
```
315303

304+
### Advacned Scenarios
305+
306+
#### Query multiple workspaces
307+
308+
One of the more advanced scenarios is to query the same query on multiple workspaces. The `additional_workspaces` parameter can be used to pass a list of workspaces that are included in the query when querying a single query over multiple workspaces. The parameter's list items can be qualified workspace names, workspace IDs, or Azure resource IDs. A primary workspace ID must be provided when querying multiple workspaces, as in the following example:
309+
310+
```python
311+
client.query(
312+
<primary_workspace_id>,
313+
query,
314+
additional_workspaces=['<workspace 1>', '<workspace 2>']
315+
)
316+
```
317+
318+
The full sample can be found [here](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py).
319+
316320
## Troubleshooting
317321

318322
Enable the `azure.monitor.query` logger to collect traces from the library.

sdk/monitor/azure-monitor-query/azure/monitor/query/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Licensed under the MIT License. See License.txt in the project root for license information.
55
# --------------------------------------------------------------------------
66

7-
from ._log_query_client import LogsQueryClient
7+
from ._logs_query_client import LogsQueryClient
88
from ._metrics_query_client import MetricsQueryClient
99

1010
from ._models import (

sdk/monitor/azure-monitor-query/azure/monitor/query/aio/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Licensed under the MIT License. See License.txt in the project root for license information.
55
# --------------------------------------------------------------------------
66

7-
from ._log_query_client_async import LogsQueryClient
7+
from ._logs_query_client_async import LogsQueryClient
88
from ._metrics_query_client_async import MetricsQueryClient
99

1010
__all__ = [

0 commit comments

Comments
 (0)