Skip to content

Commit 5ea53ea

Browse files
placerdaCopilot
andcommitted
docs(tutorial): explain where to find App Insights connection string
Section 8 told readers to add APPLICATIONINSIGHTS_CONNECTION_STRING to .azure/dev/.env but never said where the string comes from. Reword to: - Lead with the fact that the manual step is optional - AgentOps auto-discovers the connection string through the Azure AI Projects SDK when the dev Foundry project has App Insights connected. - Document three discovery paths for the manual case: Foundry portal (Tracing tab), Azure Portal (App Insights Overview), and az CLI. - Promote the section 7 callout to set the same expectation earlier. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 70897f7 commit 5ea53ea

1 file changed

Lines changed: 59 additions & 11 deletions

File tree

docs/tutorial-prompt-agent-quickstart.md

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,21 @@ agent: travel-agent:2
401401
dataset: .agentops/data/travel-smoke.jsonl
402402
```
403403
404-
> **App Insights.** The wizard does not ask for App Insights. Later
405-
> runtime commands try to discover the connected App Insights resource
406-
> through the Azure AI Projects SDK. If your dev project has no resource
407-
> attached, or your identity cannot read it, set
408-
> `APPLICATIONINSIGHTS_CONNECTION_STRING` manually inside
409-
> `.azure/dev/.env` in step 8 (and inside `.azure/sandbox/.env` if you
410-
> want sandbox traces too).
404+
> **App Insights — usually automatic.** You normally do **not** need to
405+
> set `APPLICATIONINSIGHTS_CONNECTION_STRING` by hand. As long as your
406+
> Foundry project has an Application Insights resource connected (see
407+
> the prerequisite at the top of this tutorial), AgentOps runtime
408+
> commands and CI workflows discover the connection string through the
409+
> Azure AI Projects SDK at runtime. Only set it manually if:
410+
>
411+
> - your Foundry project has no App Insights connected yet, or
412+
> - your identity cannot read the linked resource at runtime, or
413+
> - you intentionally want to point telemetry at a different App
414+
> Insights resource than the one Foundry has connected.
415+
>
416+
> The "where to find it" instructions in section 8 cover the manual
417+
> case. If you are not sure whether you need it, skip ahead to section 8
418+
> and come back if a later step complains about missing telemetry.
411419

412420
## 8. Add the dev azd environment by hand
413421

@@ -423,14 +431,54 @@ AZURE_AI_FOUNDRY_PROJECT_ENDPOINT=https://<resource>.services.ai.azure.com/api/p
423431
'@ | Set-Content -Encoding utf8 .azure\dev\.env
424432
```
425433

426-
Replace the endpoint with your real dev project endpoint from step 3. If
427-
you have the dev project's App Insights connection string, add it here
428-
too:
434+
Replace the endpoint with your real dev project endpoint from step 3.
435+
436+
### Optional: also set the dev project's App Insights connection string
437+
438+
You normally do **not** need to add this manually — AgentOps auto-discovers
439+
it through the Azure AI Projects SDK as long as the dev Foundry project
440+
has an Application Insights resource connected (see the prerequisite at
441+
the top of this tutorial). Only add the line below if auto-discovery
442+
fails or you want to override which resource telemetry goes to.
443+
444+
If you do need to set it manually, here is where to find the connection
445+
string. Pick whichever path is easiest for you:
446+
447+
**Path A — Azure AI Foundry portal (recommended, no Azure Portal
448+
hopping):**
449+
450+
1. Open <https://ai.azure.com> and select the **dev** project.
451+
2. In the left rail, open **Tracing** (under "Observability" /
452+
"Monitoring", depending on the current portal layout).
453+
3. The page shows the connected Application Insights resource with a
454+
"Copy connection string" button. Copy the value.
455+
456+
**Path B — Azure Portal:**
457+
458+
1. Open <https://portal.azure.com> and search for the Application
459+
Insights resource attached to your dev Foundry project (it is
460+
typically created alongside the project and shares its name prefix).
461+
2. On the **Overview** blade, the right-hand "Essentials" panel shows a
462+
**Connection String** field. Click the copy icon next to it.
463+
464+
**Path C — Azure CLI (one command):**
465+
466+
```powershell
467+
az monitor app-insights component show `
468+
--app <appinsights-name> `
469+
--resource-group <resource-group> `
470+
--query connectionString -o tsv
471+
```
472+
473+
Once you have the value, append it to `.azure\dev\.env`:
429474

430475
```text
431-
APPLICATIONINSIGHTS_CONNECTION_STRING=<your-connection-string>
476+
APPLICATIONINSIGHTS_CONNECTION_STRING=<paste-the-string-here>
432477
```
433478

479+
The full string starts with `InstrumentationKey=...` and includes
480+
`IngestionEndpoint=...`; paste the whole thing on one line.
481+
434482
Confirm the final topology:
435483

436484
```text

0 commit comments

Comments
 (0)