Skip to content

Commit 3089334

Browse files
committed
out_bigquery: make HTTP buffer size configurable
1 parent f3e1342 commit 3089334

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

plugins/out_bigquery/bigquery.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ static void cb_bigquery_flush(struct flb_event_chunk *event_chunk,
10141014
FLB_OUTPUT_RETURN(FLB_RETRY);
10151015
}
10161016

1017-
flb_http_buffer_size(c, 4192);
1017+
flb_http_buffer_size(c, ctx->buffer_size);
10181018
flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10);
10191019
flb_http_add_header(c, "Content-Type", 12, "application/json", 16);
10201020

@@ -1143,6 +1143,11 @@ static struct flb_config_map config_map[] = {
11431143
0, FLB_TRUE, offsetof(struct flb_bigquery, ignore_unknown_values),
11441144
"Enable ignoring unknown value",
11451145
},
1146+
{
1147+
FLB_CONFIG_MAP_INT, "buffer_size", "4192",
1148+
0, FLB_TRUE, offsetof(struct flb_bigquery, buffer_size),
1149+
"Set the HTTP buffer size",
1150+
},
11461151
/* EOF */
11471152
{0}
11481153
};

plugins/out_bigquery/bigquery.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ struct flb_bigquery {
110110

111111
int skip_invalid_rows;
112112
int ignore_unknown_values;
113+
int buffer_size;
113114

114115
flb_sds_t uri;
115116

0 commit comments

Comments
 (0)