Skip to main content

How to Set Up Spans?

Spans help you organize and track requests across microservices within traces. A trace represents the entire journey of a request through your system, while spans are smaller units of work within that trace.
1

Initialize Spans with Trace Object

Create spans with trace object
Replace ‘trace.span’ with ‘span.span’ when creating spans within an existing span
2

Alternative: Create Spans Using Logger Object

Spans
Schedule a demo to see how Maxim AI helps teams ship reliable agents.