diff --git a/receiver/m365receiver/logs.go b/receiver/m365receiver/logs.go index ffd8ddb96..a0bcdf2c8 100644 --- a/receiver/m365receiver/logs.go +++ b/receiver/m365receiver/logs.go @@ -140,7 +140,13 @@ func (l *m365LogsReceiver) Shutdown(ctx context.Context) error { l.cancel() } l.wg.Wait() - return l.checkpoint(ctx) + + err := l.checkpoint(ctx) + if err != nil { + l.logger.Error("failed checkpoint", zap.Error(err)) + } + + return l.storageClient.Close(ctx) } // spins a go routine at each poll interval to go get logs