Skip to content

Commit a1a6086

Browse files
authored
[Monitor] Update READMEs (Azure#38900)
Add info about aiohttp when using async clients. Signed-off-by: Paul Van Eck <[email protected]>
1 parent a489a26 commit a1a6086

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ credential = DefaultAzureCredential()
6464
logs_client = LogsIngestionClient(endpoint, credential)
6565
```
6666

67+
To use the asynchronous clients, you must also install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).
68+
69+
```sh
70+
pip install aiohttp
71+
```
72+
6773
#### Configure clients for non-public Azure clouds
6874

6975
By default, `LogsIngestionClient` is configured to connect to the public Azure cloud. To connect to non-public Azure clouds, some additional configuration is required. The appropriate scope for authentication must be provided using the `credential_scopes` keyword argument. The following example shows how to configure the client to connect to Azure US Government:

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ async_metrics_query_client = MetricsQueryClient(credential)
6767
async_metrics_client = MetricsClient("https://<regional endpoint>", credential)
6868
```
6969

70+
To use the asynchronous clients, you must also install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).
71+
72+
```sh
73+
pip install aiohttp
74+
```
75+
7076
#### Configure client for Azure sovereign cloud
7177

7278
By default, all clients are configured to use the Azure public cloud. To use a sovereign cloud, provide the correct `endpoint` argument when using `LogsQueryClient` or `MetricsQueryClient`. For `MetricsClient`, provide the correct `audience` argument instead. For example:

0 commit comments

Comments
 (0)