Skip to content

Commit 8822092

Browse files
committed
filter_log_to_metrics: Fix the bondary condition of overflowing
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
1 parent 7ff9b75 commit 8822092

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/filter_log_to_metrics/log_to_metrics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ static int set_labels(struct log_to_metrics_ctx *ctx,
416416
mk_list_foreach(head, &f_ins->properties) {
417417
kv = mk_list_entry(head, struct flb_kv, _head);
418418

419-
if (counter >= ctx->label_counter) {
419+
if (counter > ctx->label_counter) {
420420
flb_plg_error(ctx->ins, "internal label counter overflow");
421421
return -1;
422422
}

0 commit comments

Comments
 (0)