Repository: fluent/fluent-bit (2026-04-16T10:46:17Z)

Issue:
Upgrade from 5.0.2 to 5.0.3 breaks usage of tag_keys in influxdb output plugin
## Bug Report
After upgrading from 5.0.2 to 5.0.3 fluent-bit refuses to start with the error messages given below

**To Reproduce**
- Example log message if applicable:
```
[2026/04/15 15:59:24.195] [error] [config map] invalid value for boolean property 'tag_keys=ldap_server client_ip dn'
[2026/04/15 15:59:24.195] [error] [output] failed to initialize 'influxdb' plugin
[2026/04/15 15:59:24.195] [error] [engine] output initialization failed
```
- Steps to reproduce the problem:
Configure an influxdb output plugin and use the configuration parameter `tag_keys` with an argument
as described in the manual: a "Space-separated list of keys to tag".

**Expected behavior**
fluent-bit should continue to work as in version 5.0.2

**Your Environment**
<!--- Include as many relevant details about the environment you experienced the bug in -->
* Version used: 5.0.3 Debian package from https://packages.fluentbit.io/debian/bullseye



Discussion:

Patch:
diff --git a/plugins/out_influxdb/influxdb.c b/plugins/out_influxdb/influxdb.c
index 2e73d43276a..9fce46bf4b6 100644
--- a/plugins/out_influxdb/influxdb.c
+++ b/plugins/out_influxdb/influxdb.c
@@ -686,7 +686,7 @@ static struct flb_config_map config_map[] = {
     },
 
     {
-     FLB_CONFIG_MAP_BOOL, "tag_keys", NULL,
+     FLB_CONFIG_MAP_STR, "tag_keys", NULL,
      0, FLB_FALSE, 0,
      "Space separated list of keys that needs to be tagged."
     },


Test patch:
diff --git a/tests/runtime/out_influxdb.c b/tests/runtime/out_influxdb.c
index c536d7ea4e0..e06e882cef9 100644
--- a/tests/runtime/out_influxdb.c
+++ b/tests/runtime/out_influxdb.c
@@ -170,6 +170,61 @@ static void cb_check_negative_int_as_float_value(
     flb_free(out);
 }
 
+#define JSON_TAG_KEYS "[12345678, {\"ldap_server\":\"host1\", \"client_ip\":\"10.0.0.1\", \"dn\":\"uid=jdoe\", \"value\":1}]"
+static void cb_check_tag_keys(void *ctx, int ffd,
+                              int res_ret, void *res_data, size_t res_size,
+                              void *data)
+{
+    char *p;
+    flb_sds_t out = res_data;
+    char *tag_key_1 = ",ldap_server=host1";
+    char *tag_key_2 = ",client_ip=10.0.0.1";
+    char *tag_key_3 = ",dn=uid\\=jdoe";
+    char *field_key = "value=1";
+    char *missing_field_1 = "ldap_server=\"host1\"";
+    char *missing_field_2 = "client_ip=\"10.0.0.1\"";
+    char *missing_field_3 = "dn=\"uid\\=jdoe\"";
+
+    set_output_num(1);
+
+    p = strstr(out, tag_key_1);
+    if (!TEST_CHECK(p != NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, tag_key_2);
+    if (!TEST_CHECK(p != NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, tag_key_3);
+    if (!TEST_CHECK(p != NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, field_key);
+    if (!TEST_CHECK(p != NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, missing_field_1);
+    if (!TEST_CHECK(p == NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, missing_field_2);
+    if (!TEST_CHECK(p == NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    p = strstr(out, missing_field_3);
+    if (!TEST_CHECK(p == NULL)) {
+      TEST_MSG("Given:%s", out);
+    }
+
+    flb_free(out);
+}
+
 void flb_test_basic()
 {
     int ret;
@@ -470,6 +525,51 @@ void flb_test_negative_integer_as_float_value()
     flb_destroy(ctx);
 }
 
+void flb_test_tag_keys()
+{
+    int ret;
+    int size = sizeof(JSON_TAG_KEYS) - 1;
+    flb_ctx_t *ctx;
+    int in_ffd;
+    int out_ffd;
+
+    clear_output_num();
+
+    ctx = flb_create();
+    flb_service_set(ctx, "flush", "1", "grace", "1",
+                    "log_level", "error",
+                    NULL);
+
+    in_ffd = flb_input(ctx, (char *) "lib", NULL);
+    flb_input_set(ctx, in_ffd, "tag", "test", NULL);
+
+    out_ffd = flb_output(ctx, (char *) "influxdb", NULL);
+    flb_output_set(ctx, out_ffd,
+                   "match", "test",
+                   "tag_keys", "ldap_server client_ip dn",
+                   NULL);
+
+    ret = flb_output_set_test(ctx, out_ffd, "formatter",
+                              cb_check_tag_keys,
+                              NULL, NULL);
+
+    ret = flb_start(ctx);
+    TEST_CHECK(ret == 0);
+
+    ret = flb_lib_push(ctx, in_ffd, (char *) JSON_TAG_KEYS, size);
+    TEST_CHECK(ret >= 0);
+
+    sleep(2);
+
+    ret = get_output_num();
+    if (!TEST_CHECK(ret != 0)) {
+        TEST_MSG("no output");
+    }
+
+    flb_stop(ctx);
+    flb_destroy(ctx);
+}
+
 /* Test list */
 TEST_LIST = {
     {"basic"                  , flb_test_basic },
@@ -478,5 +578,6 @@ TEST_LIST = {
     {"int_negative_integer"   , flb_test_negative_integer_value },
     {"int_integer_as_float"   , flb_test_integer_as_float_value },
     {"int_negative_integer_as_float" , flb_test_negative_integer_as_float_value },
+    {"tag_keys"               , flb_test_tag_keys },
     {NULL, NULL}
 };