Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/observability / / GraphorinSpan

Interface: GraphorinSpan<T>

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

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

Stable

Extends

Type Parameters

Type ParameterDefault type
T extends SpanTypeSpanType

Properties

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

Methods

addEvent()

ts
addEvent(name, attrs?): void;

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

Append a span event (attribute-bearing time-stamped marker).

Parameters

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

Returns

void

Inherited from

AISpan.addEvent


end()

ts
end(): void;

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

End the span. Idempotent.

Returns

void

Inherited from

AISpan.end


recordException()

ts
recordException(err): void;

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

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:39

Parameters

ParameterType
namestring
valueSpanAttributeValue
opts?SetAttributeOptions

Returns

void


setAttributes()

ts
setAttributes(attrs): void;

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

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:44

Set the terminal status.

Parameters

ParameterType
statusSpanStatus
message?string

Returns

void

Inherited from

AISpan.setStatus