Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/observability / / emitGenAIMessageEvents
Function: emitGenAIMessageEvents()
ts
function emitGenAIMessageEvents<T>(
span,
messages,
opts?): void;Defined in: packages/observability/src/gen-ai/emit.ts:93
Emit per-message OpenTelemetry GenAI span events. The helper records one event per message — the per-message-event emission shape per the OTel semconv discipline (size-bounded individually; safer than the aggregate-attribute shape on large prompts).
Type Parameters
| Type Parameter |
|---|
T extends SpanType |
Parameters
| Parameter | Type |
|---|---|
span | AISpan<T> |
messages | readonly GenAIMessage[] |
opts | { system?: string; } |
opts.system? | string |
Returns
void