feat(streams): Add batch flush and GCS write pipeline metrics#312
Merged
feat(streams): Add batch flush and GCS write pipeline metrics#312
Conversation
Record histograms for batch element count and open duration on flush, and a gauge for successful GCS object size keyed by route source. Co-authored-by: Cursor <cursoragent@cursor.com>
fpacifici
commented
May 7, 2026
- Rename batch size/time metrics; record batch age in milliseconds - Use histogram for GCS sink bytes; rename to sink.gcs_writer.bytes Co-authored-by: Cursor <cursoragent@cursor.com>
untitaker
approved these changes
May 7, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose Rust pipeline behavior to DogStatsD alongside existing
streams.pipeline.*stats: each batch flush samples window size and how long the window stayed open, and each successful GCS upload records the written object size.Batch flush
Batchrecordscreated_atwhen the first row opens the window. On successful flush, we emit histogramsstreams.pipeline.batch.size(element count) andstreams.pipeline.batch.time_ms(milliseconds since the batch opened), tagged withstep.GCS
After a successful upload, we record a histogram sample on
streams.pipeline.sink.gcs_writer.bytesfor the payload length, tagged withsourcefrom the writer route.