Skip to content

Commit

Permalink
adding debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Mar 11, 2024
1 parent a8ae829 commit c2a82d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/tier2.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ func (a *Tier2App) IsReady(ctx context.Context) bool {
}

func (a *Tier2App) setReadiness(ready bool) {
if a.isReady.Load() && !ready {
a.logger.Debug("setting app readiness to false")
} else if !a.isReady.Load() && ready {
a.logger.Debug("setting app readiness to true")
}
a.isReady.Store(ready)
}

Expand Down
1 change: 1 addition & 0 deletions service/tier2.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func NewTier2(
func (s *Tier2Service) isOverloaded() bool {
s.connectionCountMutex.RLock()
defer s.connectionCountMutex.RUnlock()
s.logger.Debug("checking if service is overloaded", zap.Int64("current_concurrent_requests", s.currentConcurrentRequests), zap.Int64("max_concurrent_requests", s.runtimeConfig.MaxConcurrentRequests))
return s.runtimeConfig.MaxConcurrentRequests != 0 && s.currentConcurrentRequests >= s.runtimeConfig.MaxConcurrentRequests
}

Expand Down

0 comments on commit c2a82d8

Please sign in to comment.