You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lab/5-Observability/1-OpenAIAgents/weekend_planner.ipynb
+49-47Lines changed: 49 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,38 @@
7
7
"# Weekend Planner with Azure OpenAI Agents Telemetry\n",
8
8
"\n",
9
9
"Capture GenAI-compliant spans while orchestrating an Azure OpenAI Agents workflow. This notebook mirrors the sample script but keeps everything inline so you can tweak the code and immediately inspect telemetry."
10
-
]
11
-
},
12
-
{
13
-
"cell_type": "markdown",
14
-
"metadata": {},
15
-
"source": [
10
+
]
11
+
},
12
+
{
13
+
"cell_type": "markdown",
14
+
"metadata": {},
15
+
"source": [
16
16
"## Requirements\n",
17
17
"Install the supporting packages before running the cells below.\n",
"MODEL_NAME = os.environ.get(\"AZURE_AI_FOUNDRY_NAME\") or \"gpt-4o-mini\"\n",
90
+
"SERVICE_VERSION = \"1.0.0\"\n"
76
91
]
77
92
},
78
93
{
@@ -81,8 +96,8 @@
81
96
"source": [
82
97
"### Step 2: Define helpers for capture configuration\n",
83
98
"These utilities resolve the Azure OpenAI configuration, set the GenAI capture environment variables, and prepare the tracer provider used throughout the notebook.\n"
"\"OTEL_GENAI_AGENT_DESCRIPTION\": os.getenv(\"OTEL_GENAI_AGENT_DESCRIPTION\", \"Assistant that plans weekend activities using weather and events data\"),\n",
"pip install azure-identity # required when API_HOST=azure\n",
22
21
"```\n",
23
22
"\n",
24
-
"Configure environment variables for your model provider (GitHub Models by default) and optionally `APPLICATION_INSIGHTS_CONNECTION_STRING` to export to Azure Monitor."
23
+
"Export the following environment variables (unused entries can remain empty) before running the cells:\n",
24
+
"- `AZURE_OPENAI_API_KEY`\n",
25
+
"- `AZURE_OPENAI_ENDPOINT`\n",
26
+
"- `AZURE_OPENAI_API_VERSION`\n",
27
+
"- `AZURE_AI_FOUNDRY_NAME`\n",
28
+
"- `AZURE_AOAI_ACCOUNT`\n",
29
+
"- `AZURE_SUBSCRIPTION_ID`\n",
30
+
"- `AZURE_RESOURCE_GROUP`\n",
31
+
"- `AZURE_AISEARCH_ENDPOINT`\n",
32
+
"- `AZURE_AISEARCH_INDEX`\n",
33
+
"- `AZURE_AISEARCH_RESOURCE_GROUP`\n",
34
+
"- `APPLICATION_INSIGHTS_CONNECTION_STRING`\n",
35
+
"\n",
36
+
"The labs rely solely on this set of variables.\n"
"pip install azure-identity # required when API_HOST=azure\n",
22
21
"```\n",
23
22
"\n",
24
-
"Set `API_HOST` to `github` (default) or `azure`, provide the corresponding credentials, and optionally `APPLICATION_INSIGHTS_CONNECTION_STRING` for Azure Monitor export."
23
+
"Export the following environment variables (values may be blank if not used in this sample):\n",
24
+
"- `AZURE_OPENAI_API_KEY`\n",
25
+
"- `AZURE_OPENAI_ENDPOINT`\n",
26
+
"- `AZURE_OPENAI_API_VERSION`\n",
27
+
"- `AZURE_AI_FOUNDRY_NAME`\n",
28
+
"- `AZURE_AOAI_ACCOUNT`\n",
29
+
"- `AZURE_SUBSCRIPTION_ID`\n",
30
+
"- `AZURE_RESOURCE_GROUP`\n",
31
+
"- `AZURE_AISEARCH_ENDPOINT`\n",
32
+
"- `AZURE_AISEARCH_INDEX`\n",
33
+
"- `AZURE_AISEARCH_RESOURCE_GROUP`\n",
34
+
"- `APPLICATION_INSIGHTS_CONNECTION_STRING`\n",
35
+
"\n",
36
+
"The observability labs only reference this list of variables.\n"
Copy file name to clipboardExpand all lines: lab/5-Observability/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Both packages automatically apply the GenAI semantic conventions and expose togg
32
32
33
33
## Running the Samples
34
34
35
-
1.Set the environment variables for your preferred model host (GitHub Models or Azure OpenAI). Each sample documents the required variables at the top of the file.
35
+
1.Export the following environment variables before running any notebook (set unused values to an empty string): `AZURE_OPENAI_API_KEY`, `AZURE_OPENAI_ENDPOINT`, `AZURE_OPENAI_API_VERSION`, `AZURE_AI_FOUNDRY_NAME`, `AZURE_AOAI_ACCOUNT`, `AZURE_SUBSCRIPTION_ID`, `AZURE_RESOURCE_GROUP`, `AZURE_AISEARCH_ENDPOINT`, `AZURE_AISEARCH_INDEX`, `AZURE_AISEARCH_RESOURCE_GROUP`, and `APPLICATION_INSIGHTS_CONNECTION_STRING`.
36
36
1. Export an `APPLICATION_INSIGHTS_CONNECTION_STRING` if you want spans to flow into Azure Monitor; otherwise the scripts fall back to console exporters so you can inspect payloads locally.
37
37
1. Open any notebook (for example, `lab/5-Observability/1-OpenAIAgents/weekend_planner.ipynb`) and run the cells in order. Observe the emitted spans and confirm that the GenAI attributes align with the semantic conventions.
0 commit comments