Skip to content

Commit

Permalink
input_chunk: Update tag value extraction for backoff logs
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Luo <[email protected]>
  • Loading branch information
JeffLuoo committed Nov 27, 2020
1 parent 0a23aab commit 5f0dc77
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/flb_input_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,11 @@ struct flb_input_chunk *flb_input_chunk_map(struct flb_input_instance *in,
{
uint64_t chunk_routes_mask;
ssize_t bytes;
const char *tag_buf;
int tag_len;
int ret;

#ifdef FLB_HAVE_METRICS
int ret;
char *buf_data;
size_t buf_size;
#endif
Expand Down Expand Up @@ -345,7 +347,14 @@ struct flb_input_chunk *flb_input_chunk_map(struct flb_input_instance *in,
}
#endif

chunk_routes_mask = flb_router_get_routes_mask_by_tag(in->tag, in->tag_len, in);
/* Get the the tag reference (chunk metadata) */
ret = flb_input_chunk_get_tag(ic, &tag_buf, &tag_len);
if (ret == -1) {
flb_error("[input chunk] error retrieving tag of input chunk");
return ic;
}

chunk_routes_mask = flb_router_get_routes_mask_by_tag(tag_buf, tag_len, in);
if (chunk_routes_mask == 0) {
flb_warn("[input chunk] no matching route for backoff log chunk %s",
flb_input_chunk_get_name(ic));
Expand Down

0 comments on commit 5f0dc77

Please sign in to comment.