The Foundry Agent Service is configured to perform the following actions: β’ Retrieve the Application Insights connection string by calling
project_client.telemetry.get_application_insights_connection_string().
β’ Call configure_azure_monitor(connection_string=...) to enable telemetry.
A separate LangChain service configured to use OpenTelemetry and has the following configurations:
β’ Uses AzureAIOpenTelemetryTracer(connection_string=...,
enable_content_recording=False)
β’ Passes the tracer by using config={"callbacks":[azure_tracer]}
Company policy has the following requirements:
β’ Telemetry from LangChain and OpenTelemetry must be distinguishable within the same Application Insights resource.
β’ Secrets and credentials must NOT be stored in prompts, tool arguments, or span attributes.
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.

Show answerHide answer
Explanation

Explanation:
This question tests your understanding of OpenTelemetry tracing configuration for LangChain services in Azure AI Foundry. The scenario requires distinguishing telemetry from different services within the same Application Insights resource and ensuring secrets are not recorded in traces.
βοΈ Correct Options
Statement 1: No
The LangChain service will NOT appear in Traces without configuring a tracer. To collect telemetry, you must explicitly configure the AzureAIOpenTelemetryTracer and attach it to your agent via callbacks . While Foundry provides server-side tracing for hosted agents without code changes, LangChain services require client-side instrumentation using the langchain-azure-ai integration package to emit OpenTelemetry spans .
Statement 2: Yes
Setting different OTEL_SERVICE_NAME values separates services in Application Insights. The service.name resource attribute uniquely identifies a service in OpenTelemetry, enabling effective filtering and analysis of telemetry data . You can set this via the OTEL_SERVICE_NAME environment variable, which separates traces from different services within the same Application Insights resource .
Statement 3: No
When using enable_content_recording=False, prompts and tool data will NOT be captured in telemetry. Setting enable_content_recording=False is explicitly designed to redact message content and tool call arguments from traces . This satisfies the company policy requirement that secrets and credentials must NOT be stored in prompts or tool arguments.
π§ Reference
β Trace LangChain and LangGraph apps with Foundry - Microsoft Learn
Confirms that enable_content_recording=False redacts message content and tool arguments, and that a tracer must be configured for LangChain traces.

