Skill 2.3.3
Set up observability by implementing tracing, token analytics, safety signals, and latency breakdowns
Key Concepts
Tracing uses OpenTelemetry. The application configures the Azure Monitor exporter with the project's Application Insights connection string (available from the project's telemetry operations) and enables instrumentation for the OpenAI client and agent framework, so each model call becomes a span with GenAI semantic convention attributes: model, token counts and finish reason. Recording prompt and response content is optional and controlled by configuration because of privacy.
Token analytics aggregate input, cached and output tokens by application, user, feature and model to find costly prompts. Safety signals come from guardrail annotations, blocked requests and safety evaluations. Latency breakdowns compare the duration of retrieval, each model call and each tool call within a trace, and separate time to first token from total time, which shows whether to optimize retrieval, choose a faster model, shorten prompts or stream.