Skip to content

Commit

Permalink
TBS: fix log formatting (#15496) (#15499)
Browse files Browse the repository at this point in the history
Fix a missing colon in logs (typo from #15235 ), and remove "storage" in "configured storage limit reached" message to make way for #15467 to avoid confusion

(cherry picked from commit 28068bd)

Co-authored-by: Carson Ip <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
mergify[bot] and carsonip authored Jan 31, 2025
1 parent 17c93cf commit 435ae69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-pack/apm-server/sampling/eventstorage/rw.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
var (
// ErrLimitReached is returned by RW methods when storage usage
// is greater than configured limit.
ErrLimitReached = errors.New("configured storage limit reached")
ErrLimitReached = errors.New("configured limit reached")
)

// RW is a read writer interface that has methods to read and write trace event and sampling decisions.
Expand Down Expand Up @@ -102,7 +102,7 @@ func (s StorageLimitReadWriter) checkStorageLimit() error {
if limit != 0 { // unlimited storage
usage := s.checker.DiskUsage()
if usage >= limit {
return fmt.Errorf("%s: %w (current: %d, limit %d)", s.name, ErrLimitReached, usage, limit)
return fmt.Errorf("%s: %w (current: %d, limit: %d)", s.name, ErrLimitReached, usage, limit)
}
}
return nil
Expand Down

0 comments on commit 435ae69

Please sign in to comment.