Skip to content

Commit 62f98ed

Browse files
committed
Enable HTTP debug in Firehose client for illustration
It's conditional on a build flag, so it's no-op by default. Signed-off-by: Ryan Underwood <[email protected]>
1 parent 7ac03a2 commit 62f98ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugins/out_kinesis_firehose/firehose.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
#include "firehose.h"
4545
#include "firehose_api.h"
4646

47+
int flb_http_client_debug_setup(struct flb_callback *cb_ctx, struct mk_list *props);
48+
4749
static struct flb_aws_header content_type_header = {
4850
.key = "Content-Type",
4951
.key_len = 12,
@@ -288,6 +290,10 @@ static int cb_firehose_init(struct flb_output_instance *ins,
288290
ctx->firehose_client->proxy = NULL;
289291
ctx->firehose_client->static_headers = &content_type_header;
290292
ctx->firehose_client->static_headers_len = 1;
293+
if (flb_http_client_debug_setup(ctx->firehose_client->http_cb_ctx, &ins->properties) < 0) {
294+
flb_plg_error(ctx->ins, "AWS HTTP client debug initialization error");
295+
goto error;
296+
}
291297

292298
struct flb_upstream *upstream = flb_upstream_create(config, ctx->endpoint,
293299
ctx->port, FLB_IO_TLS,

0 commit comments

Comments
 (0)