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
AISpan<T>
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends SpanType | SpanType |
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
id | readonly | string | AISpan.id | packages/core/dist/contracts/tracer.d.ts:34 |
parentId? | readonly | string | AISpan.parentId | packages/core/dist/contracts/tracer.d.ts:36 |
traceId | readonly | string | AISpan.traceId | packages/core/dist/contracts/tracer.d.ts:35 |
type | readonly | T | AISpan.type | packages/core/dist/contracts/tracer.d.ts:33 |
Methods
addEvent()
addEvent(name, attrs?): void;Defined in: packages/core/dist/contracts/tracer.d.ts:40
Append a span event (attribute-bearing time-stamped marker).
Parameters
| Parameter | Type |
|---|---|
name | string |
attrs? | Readonly<Record<string, SpanAttributeValue>> |
Returns
void
Inherited from
end()
end(): void;Defined in: packages/core/dist/contracts/tracer.d.ts:46
End the span. Idempotent.
Returns
void
Inherited from
recordException()
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
| Parameter | Type |
|---|---|
err | unknown |
Returns
void
Inherited from
setAttribute()
setAttribute(
name,
value,
opts?): void;Defined in: packages/observability/src/tracer/span.ts:39
Parameters
| Parameter | Type |
|---|---|
name | string |
value | SpanAttributeValue |
opts? | SetAttributeOptions |
Returns
void
setAttributes()
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
| Parameter | Type |
|---|---|
attrs | SpanAttributes |
Returns
void
Inherited from
setStatus()
setStatus(status, message?): void;Defined in: packages/core/dist/contracts/tracer.d.ts:44
Set the terminal status.
Parameters
| Parameter | Type |
|---|---|
status | SpanStatus |
message? | string |
Returns
void