zilla
zilla copied to clipboard
Add stream state to stream frames
Description
Active stream metrics rely on being able to cancel out counters for open vs error | close, where open counters are triggered by BEGIN
frames and error counters are triggered by either ABORT
or RESET
frames.
Due to the removal of stream handlers when sending ABORT
or receiving RESET
, we do not double count these errors.
However, there are edge cases where a reply RESET
can be sent without a corresponding reply BEGIN
, making it difficult to get the active count correct without introducing a lot of memory state during the metrics recording.
Instead, we can acheive the same goal to expose metrics recording to stream state by encoding the stream state in each stream frame, as a bitset, which will also further assist with diagnostics.