@@ -841,6 +841,9 @@ static int cb_bigquery_init(struct flb_output_instance *ins,
841841 flb_sds_destroy (token );
842842 }
843843
844+ /* Setup HTTP debug callbacks */
845+ flb_output_set_http_debug_callbacks (ins );
846+
844847 return 0 ;
845848}
846849
@@ -1014,13 +1017,16 @@ static void cb_bigquery_flush(struct flb_event_chunk *event_chunk,
10141017 FLB_OUTPUT_RETURN (FLB_RETRY );
10151018 }
10161019
1017- flb_http_buffer_size (c , 4192 );
1020+ flb_http_buffer_size (c , ctx -> buffer_size );
10181021 flb_http_add_header (c , "User-Agent" , 10 , "Fluent-Bit" , 10 );
10191022 flb_http_add_header (c , "Content-Type" , 12 , "application/json" , 16 );
10201023
10211024 /* Compose and append Authorization header */
10221025 flb_http_add_header (c , "Authorization" , 13 , token , flb_sds_len (token ));
10231026
1027+ /* Enable HTTP client debug callbacks */
1028+ flb_http_client_debug (c , ctx -> ins -> callback );
1029+
10241030 /* Send HTTP request */
10251031 ret = flb_http_do (c , & b_sent );
10261032
@@ -1143,6 +1149,11 @@ static struct flb_config_map config_map[] = {
11431149 0 , FLB_TRUE , offsetof(struct flb_bigquery , ignore_unknown_values ),
11441150 "Enable ignoring unknown value" ,
11451151 },
1152+ {
1153+ FLB_CONFIG_MAP_INT , "buffer_size" , "4192" ,
1154+ 0 , FLB_TRUE , offsetof(struct flb_bigquery , buffer_size ),
1155+ "Set the HTTP buffer size" ,
1156+ },
11461157 /* EOF */
11471158 {0 }
11481159};
0 commit comments