Auto-instrumentation captures vision calls automatically. If you’re using OpenAI Vision, Gemini Pro Vision, or similar APIs, the LLM calls are traced automatically via instrumentors. This guide covers tracing your custom processing logic around those calls.
When to Use This Guide
Use these patterns when your pipeline includes:- Image preprocessing before vision model calls
- Audio transcription or synthesis
- Video frame extraction or analysis
- Document parsing with embedded media
- Media storage/retrieval operations
Basic Pattern
Trace multi-modal functions the same way as any other function - use the@trace decorator:
Adding Media Metadata
Add context about the media being processed usingenrich_span:
Multi-Step Pipeline Example
For pipelines with multiple processing stages, each traced function becomes a child span:Useful Metadata Fields
Related
Custom Spans
Full guide to the @trace decorator
Enriching Traces
Adding metadata with enrich_span
OpenAI Vision
Auto-tracing for OpenAI vision calls
Gemini Vision
Auto-tracing for Gemini vision calls

