Skip to content

Commit

Permalink
[Monitor] Update READMEs (Azure#38900)
Browse files Browse the repository at this point in the history
Add info about aiohttp when using async clients.

Signed-off-by: Paul Van Eck <[email protected]>
  • Loading branch information
pvaneck authored Dec 18, 2024
1 parent a489a26 commit a1a6086
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/monitor/azure-monitor-ingestion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ credential = DefaultAzureCredential()
logs_client = LogsIngestionClient(endpoint, credential)
```

To use the asynchronous clients, you must also install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).

```sh
pip install aiohttp
```

#### Configure clients for non-public Azure clouds

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:
Expand Down
6 changes: 6 additions & 0 deletions sdk/monitor/azure-monitor-query/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ async_metrics_query_client = MetricsQueryClient(credential)
async_metrics_client = MetricsClient("https://<regional endpoint>", credential)
```

To use the asynchronous clients, you must also install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).

```sh
pip install aiohttp
```

#### Configure client for Azure sovereign cloud

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:
Expand Down

0 comments on commit a1a6086

Please sign in to comment.