Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/observability / / asGraphorinSpan

Function: asGraphorinSpan()

ts
function asGraphorinSpan<T>(span): 
  | GraphorinSpan<T>
  | null;

Defined in: packages/observability/src/tracer/tracer.ts:280

Returns the underlying GraphorinSpan when span is a Graphorin span. Useful when callers want to reach the per-attribute sensitivity helper from a generic AISpan<T>.

Type Parameters

Type Parameter
T extends SpanType

Parameters

ParameterType
spanAISpan&lt;T&gt;

Returns

| GraphorinSpan&lt;T&gt; | null

Stable