← All courses

EDGE FDE

Intermediate

Trace every step of an AI call

Debug a slow or wrong answer by seeing each hop instead of one opaque duration.

OpenTelemetry-style spans around context pack, tool, model, and guardrail next to Instruments.

Name the hops, wrap LanguageModelSession in OSSignposter spans, and read a bad trace. iOS 27 and macOS 27 only.

Lessons

  1. One call is many hops
  2. Name context, tools, model, guardrail
  3. Read Apple's Instruments template
  4. Add OpenTelemetry-style spans
  5. Read a slow or wrong answer

Key concepts

Takeaways

Agent briefs

Related courses

Stream tokens and measure speed · Test AI behavior before you ship · Version prompts like product copy · Core AI vs Core ML vs MLX

Official references

WWDC26 243 Instruments · OSSignposter · Foundation Models