Skip to content

Commit

Permalink
feat: log failed clear scroll requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kruskall committed Nov 12, 2024
1 parent d822d12 commit c07eeb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/agentcfg/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func (f *ElasticsearchFetcher) clearScroll(ctx context.Context, scrollID string)
return
}

if resp.IsError() {
f.logger.Warn("clearscroll request returned error: %s", resp.Status())
}

defer resp.Body.Close()
}

Expand Down
4 changes: 4 additions & 0 deletions internal/sourcemap/metadata_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ func (s *MetadataESFetcher) clearScroll(ctx context.Context, scrollID string) {
return
}

if resp.IsError() {
s.logger.Warn("clearscroll request returned error: %s", resp.Status())
}

defer resp.Body.Close()
}

Expand Down

0 comments on commit c07eeb0

Please sign in to comment.