Skip to content

Commit 39c384b

Browse files
authored
Update method name to get Application Insights connection string (#42383)
1 parent 6ad2948 commit 39c384b

4 files changed

+17
-19
lines changed

sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_async_with_azure_monitor_tracing.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
pip install azure-ai-projects azure-ai-agents azure-identity opentelemetry-sdk azure-monitor-opentelemetry aiohttp
1818
1919
Set these environment variables with your own values:
20-
* PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
21-
page of your Azure AI Foundry portal.
22-
* AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
23-
messages, which may contain personal data. False by default.
24-
* AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
25-
messages, which may contain personal data. False by default.
26-
* APPLICATIONINSIGHTS_CONNECTION_STRING - Set to the connection string of your Application Insights resource.
27-
This is used to send telemetry data to Azure Monitor. You can also get the connection string programmatically
28-
from AIProjectClient using the `telemetry.get_connection_string` method. A code sample showing how to do this
29-
can be found in the `sample_telemetry_async.py` file in the azure-ai-projects telemetry samples.
20+
1) PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
21+
page of your Azure AI Foundry portal.
22+
2) AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
23+
messages, which may contain personal data. False by default.
24+
3) APPLICATIONINSIGHTS_CONNECTION_STRING - Set to the connection string of your Application Insights resource.
25+
This is used to send telemetry data to Azure Monitor. You can also get the connection string programmatically
26+
from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing
27+
how to do this can be found in the `sample_telemetry_async.py` file in the azure-ai-projects telemetry samples.
3028
"""
3129
import asyncio
3230
import time

sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_basics_with_azure_monitor_tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
1919
Set these environment variables with your own values:
2020
1) PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
21-
page of your Azure AI Foundry portal.
21+
page of your Azure AI Foundry portal.
2222
2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in
2323
the "Models + endpoints" tab in your Azure AI Foundry project.
2424
3) AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
2525
messages, which may contain personal data. False by default.
2626
4) APPLICATIONINSIGHTS_CONNECTION_STRING - Set to the connection string of your Application Insights resource.
2727
This is used to send telemetry data to Azure Monitor. You can also get the connection string programmatically
28-
from AIProjectClient using the `telemetry.get_connection_string` method. A code sample showing how to do this
29-
can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
28+
from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing
29+
how to do this can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
3030
"""
3131

3232
import os

sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_stream_eventhandler_with_azure_monitor_tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
1919
Set these environment variables with your own values:
2020
1) PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
21-
page of your Azure AI Foundry portal.
21+
page of your Azure AI Foundry portal.
2222
2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in
2323
the "Models + endpoints" tab in your Azure AI Foundry project.
2424
3) AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
2525
messages, which may contain personal data. False by default.
2626
4) APPLICATIONINSIGHTS_CONNECTION_STRING - Set to the connection string of your Application Insights resource.
2727
This is used to send telemetry data to Azure Monitor. You can also get the connection string programmatically
28-
from AIProjectClient using the `telemetry.get_connection_string` method. A code sample showing how to do this
29-
can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
28+
from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing
29+
how to do this can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
3030
"""
3131

3232
import os

sdk/ai/azure-ai-agents/samples/agents_telemetry/sample_agents_toolset_with_azure_monitor_tracing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
1919
Set these environment variables with your own values:
2020
1) PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
21-
page of your Azure AI Foundry portal.
21+
page of your Azure AI Foundry portal.
2222
2) MODEL_DEPLOYMENT_NAME - The deployment name of the AI model, as found under the "Name" column in
2323
the "Models + endpoints" tab in your Azure AI Foundry project.
2424
3) AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED - Optional. Set to `true` to trace the content of chat
2525
messages, which may contain personal data. False by default.
2626
4) APPLICATIONINSIGHTS_CONNECTION_STRING - Set to the connection string of your Application Insights resource.
2727
This is used to send telemetry data to Azure Monitor. You can also get the connection string programmatically
28-
from AIProjectClient using the `telemetry.get_connection_string` method. A code sample showing how to do this
29-
can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
28+
from AIProjectClient using the `telemetry.get_application_insights_connection_string()` method. A code sample showing
29+
how to do this can be found in the `sample_telemetry.py` file in the azure-ai-projects telemetry samples.
3030
"""
3131
from typing import Any, Callable, Set
3232

0 commit comments

Comments
 (0)