Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Skip sending oversized data to ES #166

Closed
@MinhNguyenDev

Description

@MinhNguyenDev

I had a same issue as #112, one line in the log file was too big and when the ElasticsearchLogShipper tried to send the data, it failed and kept retry over and over again, which could be costly if using AWS Elasticsearch. Could we make a change to skip the large size record ? It will fail anyway and make the whole log shipper stop working and no way to recover unless we delete the line manually.
Here is some sample code:

                        while (count < _batchPostingLimit && TryReadLine(current, ref nextLineBeginsAtOffset, out nextLine))

                        {
                            if (nextLine.Length > 1000000) // We can make this number configurable
                            {
                                SelfLog.WriteLine("Line is too long. Length {0}. Skip sending to ElasticSearch", nextLine.Length);
                                continue;
                            }
                            // Add payload
                            ++count;
                        }

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions