Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/observability / / GraphorinSpan

Interface: GraphorinSpan<T> ​

Defined in: packages/observability/src/tracer/span.ts:39

Stable

The internal span carries the convenience setAttribute(...) method exposed by the tracer surface (per-attribute sensitivity tagging) on top of the standard AISpan contract.

Extends ​

Type Parameters ​

Type ParameterDefault type
T extends SpanTypeSpanType

Properties ​

PropertyModifierTypeInherited fromDefined in
idreadonlystringAISpan.idpackages/core/dist/contracts/tracer.d.ts
parentId?readonlystringAISpan.parentIdpackages/core/dist/contracts/tracer.d.ts
traceIdreadonlystringAISpan.traceIdpackages/core/dist/contracts/tracer.d.ts
typereadonlyTAISpan.typepackages/core/dist/contracts/tracer.d.ts

Methods ​

addEvent() ​

ts
addEvent(
   name, 
   attrs?, 
   opts?): void;

Defined in: packages/core/dist/contracts/tracer.d.ts

Append a span event (attribute-bearing time-stamped marker). The optional opts tags the event's attributes with a sensitivity tier so the validation exporter can pass safe ones through the default-deny floor - untagged attributes keep being dropped below the floor.

Parameters ​

ParameterType
namestring
attrs?Readonly<Record&lt;string, SpanAttributeValue&gt;>
opts?AddEventOptions

Returns ​

void

Inherited from ​

AISpan.addEvent


end() ​

ts
end(): void;

Defined in: packages/core/dist/contracts/tracer.d.ts

End the span. Idempotent.

Returns ​

void

Inherited from ​

AISpan.end


recordException() ​

ts
recordException(err): void;

Defined in: packages/core/dist/contracts/tracer.d.ts

Record an exception. Multiple calls are kept in the span event log.

Parameters ​

ParameterType
errunknown

Returns ​

void

Inherited from ​

AISpan.recordException


setAttribute() ​

ts
setAttribute(
   name, 
   value, 
   opts?): void;

Defined in: packages/observability/src/tracer/span.ts:40

Parameters ​

ParameterType
namestring
valueSpanAttributeValue
opts?SetAttributeOptions

Returns ​

void


setAttributes() ​

ts
setAttributes(attrs): void;

Defined in: packages/core/dist/contracts/tracer.d.ts

Add or replace attributes. Repeated calls are merged (last write wins).

Parameters ​

ParameterType
attrsSpanAttributes

Returns ​

void

Inherited from ​

AISpan.setAttributes


setStatus() ​

ts
setStatus(status, message?): void;

Defined in: packages/core/dist/contracts/tracer.d.ts

Set the terminal status.

Parameters ​

ParameterType
statusSpanStatus
message?string

Returns ​

void

Inherited from ​

AISpan.setStatus