Skip to content

Commit

Permalink
filter_log_to_metrics: process the 'add_label' property, which was re…
Browse files Browse the repository at this point in the history
…named from 'label'.

Signed-off-by: Phillip Whelan <[email protected]>
  • Loading branch information
pwhelan authored and leonardo-albertovich committed Sep 26, 2023
1 parent 570f42c commit 1aa1104
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/filter_log_to_metrics/log_to_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int set_labels(struct log_to_metrics_ctx *ctx,
snprintf(label_keys[counter], MAX_LABEL_LENGTH - 1, "%s", kv->val);
counter++;
}
else if (strcasecmp(kv->key, "label") == 0) {
else if (strcasecmp(kv->key, "add_label") == 0) {
split = flb_utils_split(kv->val, ' ', 1);
if (mk_list_size(split) != 2) {
flb_plg_error(ctx->ins, "invalid label, expected name and key");
Expand Down

0 comments on commit 1aa1104

Please sign in to comment.