Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporterhelper] log storage errors with higher severity #7477

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions exporter/exporterhelper/internal/persistent_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ func (pcs *persistentContiguousStorage) put(req Request) error {

ctx := context.Background()
_, err := newBatch(pcs).setItemIndex(writeIndexKey, pcs.writeIndex).setRequest(itemKey, req).execute(ctx)
if err != nil {
pcs.logger.Warn("Failed updating write index",
zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err))
}

// Inform the loop that there's some data to process
pcs.putChan <- struct{}{}
Expand Down Expand Up @@ -321,7 +325,7 @@ func (pcs *persistentContiguousStorage) retrieveNotDispatchedReqs(ctx context.Co
}

if cleanupErr != nil {
pcs.logger.Debug("Failed cleaning items left by consumers", zap.String(zapQueueNameKey, pcs.queueName), zap.Error(cleanupErr))
pcs.logger.Warn("Failed cleaning items left by consumers", zap.String(zapQueueNameKey, pcs.queueName), zap.Error(cleanupErr))
}

if retrieveErr != nil {
Expand Down Expand Up @@ -354,7 +358,7 @@ func (pcs *persistentContiguousStorage) itemDispatchingStart(ctx context.Context
setItemIndexArray(currentlyDispatchedItemsKey, pcs.currentlyDispatchedItems).
execute(ctx)
if err != nil {
pcs.logger.Debug("Failed updating currently dispatched items",
pcs.logger.Error("Failed updating currently dispatched items",
zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err))
}
}
Expand All @@ -374,7 +378,7 @@ func (pcs *persistentContiguousStorage) itemDispatchingFinish(ctx context.Contex
delete(pcs.itemKey(index)).
execute(ctx)
if err != nil {
pcs.logger.Debug("Failed updating currently dispatched items",
pcs.logger.Error("Failed updating currently dispatched items",
zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err))
}
}
Expand All @@ -385,7 +389,7 @@ func (pcs *persistentContiguousStorage) updateReadIndex(ctx context.Context) {
execute(ctx)

if err != nil {
pcs.logger.Debug("Failed updating read index",
pcs.logger.Warn("Failed updating read index",
zap.String(zapQueueNameKey, pcs.queueName), zap.Error(err))
}
}
Expand Down