Skip to content

Connectum API Reference / @connectum/otel / shared / StreamOptions

Interface: StreamOptions ​

Defined in: shared.ts:82

Options of wrapAsyncIterable beyond the span and the direction.

Properties ​

onEnd? ​

optional onEnd?: (outcome) => void

Defined in: shared.ts:92

Called once when a stream that ends its span ends: after the last message, after an error, or when the consumer stops reading. It runs before the span ends, so it can still put attributes on the span, and it takes over the recording of a failure (without it the failure is recorded on the span as is). An exception it throws is swallowed: telemetry must not change what the consumer of the stream receives.

Parameters ​

outcome ​

StreamOutcome

Returns ​

void


schema? ​

optional schema?: DescMessage

Defined in: shared.ts:84

Descriptor of the stream's message type; event sizes are the serialized length under it.