diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index 5e762749a65d..2200216be4ef 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -131,6 +131,8 @@ func (s *syncBulkIndexerSession) Add(ctx context.Context, index string, document if err != nil { return err } + // flush bytes should operate on uncompressed length + // as Elasticsearch http.max_content_length measures uncompressed length. if s.bi.UncompressedLen() >= s.s.flushBytes { return s.Flush(ctx) }