galtea.spans object.
Remember that we will be using the
galtea object. More information here.Two Approaches to Span Collection
The SDK provides two ways to collect spans:1. Automatic Collection with with generate()
When using galtea.traces.generate(), span collection is handled automatically:
2. Manual Collection with Context Management
For full control over the span lifecycle, useset_context() and clear_context():
Set context before running traced functions:
Service Methods
Context Management
Direct API Methods
Related
Span
Understand how spans capture the internal operations of your AI agents.