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

# get_current_span

> Get the currently active span as a Fiddler wrapper (inside a traced function).

Retrieves the span from the current context and verifies it belongs to Fiddler's tracer
to maintain isolation from other OpenTelemetry tracers.

## Parameters

**as\_type** `Literal['span', 'generation', 'chain', 'tool']` (default: 'span')

Wrapper type — `"span"`, `"generation"`, `"chain"`, or `"tool"`.

## Returns

Current span wrapper, or None if no active Fiddler span exists.
