createObservationHub
Purpose and behavior
Section titled “Purpose and behavior”Create a root hub that stamps every event with one shared sequence and delivers a copy to each sink through its own bounded queue. Pass it as observation to a workflow or dispatch: runs emit through scoped children, and you own and close the root. Sink failures and losses are collected, never thrown; the hub stores nothing.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsOptionalObservationHubOptions | undefinedReceivers, initial scope, delivery limits and opt-in model payload verbosity.options.sinksOptionalreadonly ObservationSink[] | undefinedReceivers attached to this root and inherited by every child.options.scopeOptionalObservationScope | undefinedInitial correlation fields; child scopes override only explicitly supplied fields.options.capacityOptionalnumber | undefinedMaximum events waiting per asynchronous sink, default 1024; on overflow the newest are dropped and counted. A value that is not a positive integer throws.options.deliveryTimeoutMsOptionalnumber | undefinedMaximum wait for one asynchronous delivery or sink flush, default 5000; a sink that exceeds it is disabled for the hub’s lifetime. A value that is not a positive integer throws.options.verboseOptionalboolean | undefinedExplicitly allow full model request/response events. Does not enable verbose journal retention by itself.