Skill 4.2.4
Configure detailed logging, tracing, and debugging capabilities for production troubleshooting
Key Concepts
Tracing uses OpenTelemetry. Instrumentation for the OpenAI SDK, the Microsoft Agent Framework, LangChain and other libraries creates spans for model calls, tool calls, retrieval and agent steps, with attributes from the generative AI semantic conventions such as the model, token counts and finish reason. Exported to the Application Insights resource connected to the project, traces appear in the Foundry portal and in Azure Monitor.
Recording prompt and response content is disabled by default because it can contain personal data, and is enabled deliberately with an environment variable where policy allows it. Logs add application events and errors, correlated with traces through the operation ID, and KQL queries in Log Analytics find slow spans, failed tool calls and error patterns across many requests.