Skip to content

Pending records not sent when exiting #11

@piequi

Description

@piequi

Hi there!

We recently discovered that the last log lines of a short-living container were not sent on shutdown.

Fluentbit with the SQS plugin are collecting the logs from a side-car container in an ECS task. When the main container exists, the SIGTERM signal is sent to Fluentbit which makes it stop after the Grace period.

Looking at the plugin code, when FLBPluginExit() is invoked, the pending records in SqsRecords are not sent to SQS queue. A simple status is returned but nothing else is done :

func FLBPluginExit() int {

Padding the logs with 10 dummy lines at the end is our current workaround. Some of those padding logs are never sent obvisouly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions