> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# End Span • Rust AI Agent SDK

> end_span: End a span.

# end\_span

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**TraceContext**](../classes/TraceContext) class in the [**trace**](../modules/trace) module.

End a span.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def end_span(&mut self, span_id: &str) -> ()
```

## Parameters

<ParamField query="span_id" type="&str" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="()">
  The result of the operation.
</ResponseField>
