Skip to content

Commit

Permalink
Update aggregators/aggregator.go
Browse files Browse the repository at this point in the history
Co-authored-by: Vishal Raj <vishal.raj@elastic.co>
  • Loading branch information
carsonip and lahsivjar authored Sep 20, 2023
1 parent dc7e257 commit 92d111e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions aggregators/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,10 @@ func (a *Aggregator) processHarvest(
}
overflowLogger := nopLogger
if a.cfg.OverflowLogging {
overflowLogger = a.cfg.Logger.With(zap.Duration("aggregation_interval_ns", aggIvl))
if kvs := a.cfg.CombinedMetricsIDToKVs(cmk.ID); len(kvs) > 0 {
overflowLogger = overflowLogger.With(otelKVsToZapFields(kvs)...)
}
fields := append([]zap.Field{
zap.Duration("aggregation_interval_ns", aggIvl),
}, otelKVsToZapFields(kvs)...)

Check failure on line 604 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / run-tests

undefined: kvs

Check failure on line 604 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / lint

undefined: kvs

Check failure on line 604 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / lint

undefined: kvs
overflowLogger = a.cfg.Logger.WithLazy(fields...)

Check failure on line 605 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / run-tests

a.cfg.Logger.WithLazy undefined (type *zap.Logger has no field or method WithLazy)

Check failure on line 605 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / lint

a.cfg.Logger.WithLazy undefined (type *zap.Logger has no field or method WithLazy) (compile)

Check failure on line 605 in aggregators/aggregator.go

View workflow job for this annotation

GitHub Actions / lint

a.cfg.Logger.WithLazy undefined (type *zap.Logger has no field or method WithLazy) (compile)
}
hs.addOverflows(cm, a.cfg.Limits, overflowLogger)

Expand Down

0 comments on commit 92d111e

Please sign in to comment.