Skip to content

Instantly share code, notes, and snippets.

@pberlowski
Created January 16, 2019 17:30
Show Gist options
  • Save pberlowski/6855a647f74b4d3c647e2d1ab344e525 to your computer and use it in GitHub Desktop.
Save pberlowski/6855a647f74b4d3c647e2d1ab344e525 to your computer and use it in GitHub Desktop.
Patch for buffer_size metric reset.
diff --git a/internal/models/running_output.go b/internal/models/running_output.go
index 8d7d9854..97989a14 100644
--- a/internal/models/running_output.go
+++ b/internal/models/running_output.go
@@ -186,6 +186,10 @@ func (ro *RunningOutput) Write() error {
}
ro.buffer.Accept(batch)
}
+
+ nBuffer = ro.buffer.Len()
+ ro.BufferSize.Set(int64(nBuffer))
+
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment