Skip to content

Commit

Permalink
out_kinesis_firehose: support auto_retry_requests for failed connections
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Fala <[email protected]>
  • Loading branch information
matthewfala authored and PettitWesley committed Sep 7, 2021
1 parent 139fe53 commit f39d970
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugins/out_kinesis_firehose/firehose.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ static int cb_firehose_init(struct flb_output_instance *ins,
ctx->firehose_client->has_auth = FLB_TRUE;
ctx->firehose_client->provider = ctx->aws_provider;
ctx->firehose_client->region = (char *) ctx->region;
ctx->firehose_client->retry_requests = ctx->retry_requests;
ctx->firehose_client->service = "firehose";
ctx->firehose_client->port = 443;
ctx->firehose_client->flags = 0;
Expand Down Expand Up @@ -436,6 +437,16 @@ static struct flb_config_map config_map[] = {
"the log message will be sent to Firehose."
},

{
FLB_CONFIG_MAP_BOOL, "auto_retry_requests", "false",
0, FLB_TRUE, offsetof(struct flb_firehose, retry_requests),
"Immediately retry failed requests to AWS services once. This option "
"does not affect the normal Fluent Bit retry mechanism with backoff. "
"Instead, it enables an immediate retry with no delay for networking "
"errors, which may help improve throughput when there are transient/random "
"networking issues."
},

/* EOF */
{0}
};
Expand Down
1 change: 1 addition & 0 deletions plugins/out_kinesis_firehose/firehose.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ struct flb_firehose {
const char *log_key;
char *sts_endpoint;
int custom_endpoint;
int retry_requests;

/* must be freed on shutdown if custom_endpoint is not set */
char *endpoint;
Expand Down

0 comments on commit f39d970

Please sign in to comment.