Expand description
Observability for the streaming engine.
The scheduler can optionally report, for every completed HTTP request, a
RequestStats record and, when the stream ends, an aggregate
StreamSummary. These are surfaced through the StreamObserver trait,
which is attached explicitly via
Client::stream_arrow_with_observer.
StreamMetrics is a ready-made, thread-safe observer implementation
(atomics plus a small fixed histogram) that the caller constructs, passes in,
and reads from during or after the stream. Power users can implement
StreamObserver themselves to collect raw RequestStats (for exact
percentiles, custom exporters, etc.).
When no observer is attached the engine does no metrics work at all — there is zero overhead on the default streaming paths.
Structs§
- Request
Stats - Metrics for a single completed HTTP request, reported via
StreamObserver::on_request. - Stream
Metrics - Thread-safe aggregate metrics handle.
- Stream
Summary - Aggregate summary of a stream run, produced by
StreamMetrics::summaryand passed toStreamObserver::on_finish.
Enums§
- Request
Kind - Whether a scheduled request extended the frontier or backfilled a gap left by an earlier truncated response.
Constants§
- NUM_
SIZE_ BUCKETS - Number of size-vs-target histogram buckets.
- SIZE_
BUCKET_ LABELS - Human-readable labels for the size-vs-target histogram buckets, relative to
response_bytes_target.
Traits§
- Stream
Observer - Observer that receives streaming metrics.