Skip to content
1 min read · 198 words

Type Alias: DispatchRunnerObservabilityHooks

ts
type DispatchRunnerObservabilityHooks = {
  dispatchEnd: [[DispatchEndEvent], []];
  dispatchStart: [[DispatchStartEvent], []];
  error: [[BaseException], []];
  iterationEnd: [[IterationEndEvent], []];
  iterationStart: [[IterationStartEvent], []];
  log: [[LogEvent], []];
  toolExecutionEnd: [[ToolExecutionEndEvent], []];
  toolExecutionStart: [[ToolExecutionStartEvent], []];
};

Observability hook events on @nhtio/adk!DispatchRunner.

Remarks

Instrumentation-only events. Register handlers via the observers field of the dispatch input. Removing an observer does not affect dispatch correctness.

Properties

PropertyTypeDescription
dispatchEnd[[DispatchEndEvent], []]Fired once when the dispatch ends (ack / nack / aborted).
dispatchStart[[DispatchStartEvent], []]Fired once when the dispatch begins.
error[[BaseException], []]Fired when a non-fatal pipeline or executor error occurs. The exception is also re-thrown.
iterationEnd[[IterationEndEvent], []]Fired at the end of each iteration.
iterationStart[[IterationStartEvent], []]Fired at the start of each iteration.
log[[LogEvent], []]Fired for every structured log event emitted by the executor via DispatchExecutorHelpers.log.
toolExecutionEnd[[ToolExecutionEndEvent], []]Forwarded from the context after a tool handler returns or throws.
toolExecutionStart[[ToolExecutionStartEvent], []]Forwarded from the context immediately before a tool handler is called.