Skip to content

Commit

Permalink
fix: increase lag time log print
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguptajss authored and cgrinds committed Mar 20, 2023
1 parent 8ca5f0c commit ce6ba83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/poller/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,9 @@ func (c *AbstractCollector) Start(wg *sync.WaitGroup) {
if nd := c.Schedule.NextDue(); nd > 0 {
c.Logger.Debug().Msgf("sleeping %s until next poll", nd.String()) //DEBUG
c.Schedule.Sleep()
// log if lagging by more than 50 ms
// log if lagging by more than 500 ms
// < is used since larger durations are more negative
} else if nd.Milliseconds() <= -50 && !c.Schedule.IsStandBy() {
} else if nd.Milliseconds() <= -500 && !c.Schedule.IsStandBy() {
c.Logger.Warn().
Str("lag", (-nd).String()).
Msg("lagging behind schedule")
Expand Down

0 comments on commit ce6ba83

Please sign in to comment.