Skip to content

Commit

Permalink
Add batching and flush guidance to debugging guide
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <wppttt@amazon.com>
  • Loading branch information
PettitWesley committed May 6, 2022
1 parent f2b3191 commit e3744fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions troubleshooting/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,23 @@ Many Fluent Bit problems can be easily understood once you have full log output.

The log level for Fluent Bit can be set in the [Service section](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/configuration-file), or by setting the env var `FLB_LOG_LEVEL=debug`.

#### Checking Batch sizes

The AWS APIs for CloudWatch, Firehose, and Kinesis have limits on the number of events and number of bytes that can be sent in each request. If you enable debug logging with AWS for Fluent Bit version TBD+, then Fluent Bit will log debug information as follows for each API request:

```
[2022/05/06 22:43:17] [debug] [output:cloudwatch_logs:cloudwatch_logs.0] cloudwatch:PutLogEvents: events=6, payload=553 bytes
[2022/05/06 22:43:17] [debug] [output:kinesis_firehose:kinesis_firehose.0] firehose:PutRecordBatch: events=10, payload=666000 bytes
[2022/05/06 22:43:17] [debug] [output:kinesis_streams:kinesis_streams.0] kinesis:PutRecords: events=4, payload=4000 bytes
```

You can then experiment with different settings for the [Flush interval](https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/configuration-file) and find the lowest value that leads to efficient batching (so that in general, batches are close to the max allowed size):

```
[Service]
Flush 2
```

#### Searching old issues

When you first see an issue that you don't understand, the best option is to check *open and closed* issues in both repos:
Expand Down

0 comments on commit e3744fd

Please sign in to comment.