Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Set up observability by implementing tracing, token analytics, safety signals, and latency breakdowns

A worked example

Complete the statement

A developer is troubleshooting a Python application that invokes a Foundry agent. Its custom application spans reach Application Insights, but SDK model-call spans are missing.

For the next run:

  • AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING is initially unset.
  • OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT is explicitly set to "false".
  • The developer can insert one statement before creating the clients.

Model-call spans must be enabled, and message-content capture must remain disabled.

Which statement should the developer insert?

  • Blank 1: os.environ["AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING"] = "true" (correct answer)

    Setting the GenAI tracing control to true enables SDK model-call spans while preserving the existing content-capture setting. Setting it to false fails the requirement "Model-call spans must be enabled". Setting the message-content control to true fails "message-content capture must remain disabled" and does not enable the separate GenAI tracing control.

Why

Exporting custom application spans does not establish that SDK model-call tracing is enabled. The reference implementation states that model-call spans are disabled by default and uses a separate environment control to enable them before client creation. Enabling that control leaves the explicitly disabled message-content capture setting unchanged.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free