Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out_bigquery: Add debug log for response payload when HTTP 200 OK #8736

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/out_bigquery/bigquery.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,10 @@ static void cb_bigquery_flush(struct flb_event_chunk *event_chunk,
/* The request was issued successfully, validate the 'error' field */
flb_plg_debug(ctx->ins, "HTTP Status=%i", c->resp.status);
if (c->resp.status == 200) {
/* Even with HTTP 200, the resp payload could contain errors, e.g. insetErrors */
if (c->resp.payload && c->resp.payload_size > 0) {
flb_plg_debug(ctx->ins, "response\n%s", c->resp.payload);
}
ret_code = FLB_OK;
}
else {
Expand Down