Skip to content

Commit

Permalink
streamproducer: add verbose logging to span config event stream
Browse files Browse the repository at this point in the history
It was helpful while looking into cockroachdb#111541

Release note: None
  • Loading branch information
msbutler committed Oct 5, 2023
1 parent 98d28a4 commit c577c50
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ func (s *spanConfigEventStream) streamLoop(ctx context.Context) error {
batcher.addSpanConfigs(bufferedEvents, update.Timestamp)
bufferedEvents = bufferedEvents[:0]
if pacer.shouldCheckpoint(update.Timestamp, true) || fromFullScan {
log.VEventf(ctx, 2, "checkpointing span config stream at %s", update.Timestamp.GoTime())
if batcher.getSize() > 0 {
log.VEventf(ctx, 2, "sending %d span config events", len(batcher.batch.SpanConfigs))
if err := s.flushEvent(ctx, &streampb.StreamEvent{Batch: &batcher.batch}); err != nil {
return err
}
Expand Down

0 comments on commit c577c50

Please sign in to comment.