Skip to content

Commit

Permalink
Change logging to debug level and add more details to prevent confusi…
Browse files Browse the repository at this point in the history
…on (#1300)

What changed?
Change warning message for unknown event type to debug level

Why?
It's creating too much warning log that overwhelm system

How did you test it?
Unit test

Potential risks
Only remove logger so no danger
  • Loading branch information
timl3136 authored Dec 4, 2023
1 parent 4e88930 commit 16c678e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/internal_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,8 @@ func estimateHistorySize(logger *zap.Logger, event *s.HistoryEvent) int {
sum += len(event.SignalExternalWorkflowExecutionInitiatedEventAttributes.Control)
sum += len(event.SignalExternalWorkflowExecutionInitiatedEventAttributes.Input)
}

default:
logger.Warn("unknown event type", zap.String("Event Type", event.GetEventType().String()))
// Do not fail to be forward compatible with new events
logger.Debug("unsupported event type for history size estimation", zap.String("Event Type", event.GetEventType().String()))
}

return sum
Expand Down

0 comments on commit 16c678e

Please sign in to comment.