Skip to content

Commit 85e1b6b

Browse files
authored
[Infra] Default AZURE_USE_APPLICATION_INSIGHTS to true, so that monitoring is always provisioned (#992)
* Default monitoring to true * update toc
1 parent 5de99a3 commit 85e1b6b

File tree

2 files changed

+23
-25
lines changed

2 files changed

+23
-25
lines changed

README.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ urlFragment: azure-search-openai-demo
1717

1818
# ChatGPT + Enterprise data with Azure OpenAI and AI Search
1919

20-
> [!IMPORTANT]
20+
> [!IMPORTANT]
2121
> As of November 15, 2023, Azure Cognitive Search has been renamed to Azure AI Search.
2222
23-
### Announcing [**JavaScript**](https://aka.ms/azai/js/code), [**.NET**](https://aka.ms/azai/net/code), and [**Java**](https://aka.ms/azai/java/code) samples based on this one in [**Python**](https://aka.ms/azai/py/code). Learn more at https://aka.ms/azai.
23+
### Announcing [**JavaScript**](https://aka.ms/azai/js/code), [**.NET**](https://aka.ms/azai/net/code), and [**Java**](https://aka.ms/azai/java/code) samples based on this one in [**Python**](https://aka.ms/azai/py/code). Learn more at https://aka.ms/azai.
2424

2525
## Table of Contents
2626

@@ -37,12 +37,13 @@ urlFragment: azure-search-openai-demo
3737
- [Deploying again](#deploying-again)
3838
- [Sharing environments](#sharing-environments)
3939
- [Enabling optional features](#enabling-optional-features)
40-
- [Enabling Application Insights](#enabling-application-insights)
4140
- [Enabling authentication](#enabling-authentication)
4241
- [Enabling login and document level access control](#enabling-login-and-document-level-access-control)
4342
- [Enabling CORS for an alternate frontend](#enabling-cors-for-an-alternate-frontend)
4443
- [Using the app](#using-the-app)
4544
- [Running locally](#running-locally)
45+
- [Monitoring with Application Insights](#monitoring-with-application-insights)
46+
- [Customizing the UI and data](#customizing-the-ui-and-data)
4647
- [Productionizing](#productionizing)
4748
- [Resources](#resources)
4849
- [Note](#note)
@@ -64,7 +65,7 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
6465
* Explores various options to help users evaluate the trustworthiness of responses with citations, tracking of source content, etc.
6566
* Shows possible approaches for data preparation, prompt construction, and orchestration of interaction between model (ChatGPT) and retriever (AI Search)
6667
* Settings directly in the UX to tweak the behavior and experiment with options
67-
* Optional performance tracing and monitoring with Application Insights
68+
* Performance tracing and monitoring with Application Insights
6869

6970
![Chat screen](docs/chatscreen.png)
7071

@@ -238,26 +239,6 @@ either you or they can follow these steps:
238239

239240
## Enabling optional features
240241

241-
### Enabling Application Insights
242-
243-
To enable Application Insights and the tracing of each request, along with the logging of errors, set the `AZURE_USE_APPLICATION_INSIGHTS` variable to true before running `azd up`
244-
245-
1. Run `azd env set AZURE_USE_APPLICATION_INSIGHTS true`
246-
1. Run `azd up`
247-
248-
To see the performance data, go to the Application Insights resource in your resource group, click on the "Investigate -> Performance" blade and navigate to any HTTP request to see the timing data.
249-
To inspect the performance of chat requests, use the "Drill into Samples" button to see end-to-end traces of all the API calls made for any chat request:
250-
251-
![Tracing screenshot](docs/transaction-tracing.png)
252-
253-
To see any exceptions and server errors, navigate to the "Investigate -> Failures" blade and use the filtering tools to locate a specific exception. You can see Python stack traces on the right-hand side.
254-
255-
You can also see chart summaries on a dashboard by running the following command:
256-
257-
```shell
258-
azd monitor
259-
```
260-
261242
### Enabling authentication
262243

263244
By default, the deployed Azure web app will have no authentication or access restrictions enabled, meaning anyone with routable network access to the web app can chat with your indexed data. You can require authentication to your Azure Active Directory by following the [Add app authentication](https://learn.microsoft.com/azure/app-service/scenario-secure-app-authentication-app-service) tutorial and set it up against the deployed web app.
@@ -300,6 +281,23 @@ Once in the web app:
300281
* Explore citations and sources
301282
* Click on "settings" to try different options, tweak prompts, etc.
302283

284+
## Monitoring with Application Insights
285+
286+
By default, deployed apps use Application Insights for the tracing of each request, along with the logging of errors.
287+
288+
To see the performance data, go to the Application Insights resource in your resource group, click on the "Investigate -> Performance" blade and navigate to any HTTP request to see the timing data.
289+
To inspect the performance of chat requests, use the "Drill into Samples" button to see end-to-end traces of all the API calls made for any chat request:
290+
291+
![Tracing screenshot](docs/transaction-tracing.png)
292+
293+
To see any exceptions and server errors, navigate to the "Investigate -> Failures" blade and use the filtering tools to locate a specific exception. You can see Python stack traces on the right-hand side.
294+
295+
You can also see chart summaries on a dashboard by running the following command:
296+
297+
```shell
298+
azd monitor
299+
```
300+
303301
## Customizing the UI and data
304302

305303
Once you successfully deploy the app, you can start customizing it for your needs: changing the text, tweaking the prompts, and replacing the data. Consult the [app customization guide](docs/customization.md) as well as the [data ingestion guide](docs/data_ingestion.md) for more details.

infra/main.parameters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"value": "${OPENAI_ORGANIZATION}"
7979
},
8080
"useApplicationInsights": {
81-
"value": "${AZURE_USE_APPLICATION_INSIGHTS=false}"
81+
"value": "${AZURE_USE_APPLICATION_INSIGHTS=true}"
8282
},
8383
"useAuthentication": {
8484
"value": "${AZURE_USE_AUTHENTICATION=false}"

0 commit comments

Comments
 (0)