Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/observability / / GraphorinSpan
Interface: GraphorinSpan<T>
Defined in: packages/observability/src/tracer/span.ts:39
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 |
parentId? | readonly | string | AISpan.parentId | packages/core/dist/contracts/tracer.d.ts |
traceId | readonly | string | AISpan.traceId | packages/core/dist/contracts/tracer.d.ts |
type | readonly | T | AISpan.type | packages/core/dist/contracts/tracer.d.ts |
Methods
addEvent()
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 (W-094) 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
| Parameter | Type |
|---|---|
name | string |
attrs? | Readonly<Record<string, SpanAttributeValue>> |
opts? | AddEventOptions |
Returns
void
Inherited from
end()
end(): void;Defined in: packages/core/dist/contracts/tracer.d.ts
End the span. Idempotent.
Returns
void
Inherited from
recordException()
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
| Parameter | Type |
|---|---|
err | unknown |
Returns
void
Inherited from
setAttribute()
setAttribute(
name,
value,
opts?): void;Defined in: packages/observability/src/tracer/span.ts:40
Parameters
| Parameter | Type |
|---|---|
name | string |
value | SpanAttributeValue |
opts? | SetAttributeOptions |
Returns
void
setAttributes()
setAttributes(attrs): void;Defined in: packages/core/dist/contracts/tracer.d.ts
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
Set the terminal status.
Parameters
| Parameter | Type |
|---|---|
status | SpanStatus |
message? | string |
Returns
void