Skip to content

Commit

Permalink
cloudwatch_logs: enable synchronous scheduler and async networking on…
Browse files Browse the repository at this point in the history
… cloudwatch

Signed-off-by: Matthew Fala <falamatt@amazon.com>
  • Loading branch information
matthewfala committed Nov 10, 2022
1 parent ba663ae commit e2fea48
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions plugins/out_cloudwatch_logs/cloudwatch_logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
}

/*
* Remove async flag from upstream
* CW output runs in sync mode; because the CW API currently requires
* PutLogEvents requests to a log stream to be made serially
* Keep cloudwatch networking on the async network stack.
* Opt into the FLB_OUTPUT_SYNCHRONOUS plugin option
*/
upstream->flags &= ~(FLB_IO_ASYNC);
// upstream->flags &= ~(FLB_IO_ASYNC);

ctx->cw_client->upstream = upstream;
flb_output_upstream_set(upstream, ctx->ins);
Expand Down Expand Up @@ -666,7 +665,7 @@ struct flb_output_plugin out_cloudwatch_logs_plugin = {
.cb_init = cb_cloudwatch_init,
.cb_flush = cb_cloudwatch_flush,
.cb_exit = cb_cloudwatch_exit,
.flags = 0,
.flags = FLB_OUTPUT_SYNCHRONOUS,
.workers = 1,

/* Configuration */
Expand Down

0 comments on commit e2fea48

Please sign in to comment.