Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions include/fluent-bit/flb_plugin_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@

struct flb_plugin_proxy_def {
/* Fields populated once remote flb_cb_register() is called */
int type; /* defined by FLB_PROXY_[INPUT|OUTPUT]_PLUGIN */
int proxy; /* proxy type */
int type; /* defined by FLB_PROXY_[INPUT|OUTPUT]_PLUGIN */
int proxy; /* proxy type */
int flags;
char *name; /* plugin short name */
char *description; /* plugin description */
int event_type; /* event type (logs/metrics/traces) */
char *name; /* plugin short name */
char *description; /* plugin description */
int event_type; /* event type (logs/metrics/traces) */
struct flb_config_map *config_map; /* plugin's configuration */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Propagate proxy config maps to custom plugins

When a Go proxy registers as FLB_PROXY_CUSTOM_PLUGIN and sets this new field, it is dropped because flb_proxy_register_custom() only copies flags/name/description into struct flb_custom_plugin. The custom path does have config-map validation (flb_custom_plugin_property_check() gates on p->config_map), so those plugins will silently accept unknown properties and won't get defaults/dynamic-env handling even though input/output proxy plugins do.

Useful? React with 👍 / 👎.

};

/* Proxy context */
Expand Down
3 changes: 3 additions & 0 deletions src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ static int flb_proxy_register_output(struct flb_plugin_proxy *proxy,
out->proxy = proxy;
out->flags = def->flags;
out->name = flb_strdup(def->name);
out->config_map = def->config_map;

/* If event_type is unset (0) then default to logs (this is the current behavior) */
if (def->event_type == 0) {
Expand Down Expand Up @@ -404,6 +405,7 @@ static int flb_proxy_register_input(struct flb_plugin_proxy *proxy,
in->flags = def->flags | FLB_INPUT_THREADED;
in->name = flb_strdup(def->name);
in->description = def->description;
in->config_map = def->config_map;

mk_list_add(&in->_head, &config->in_plugins);

Expand Down Expand Up @@ -505,6 +507,7 @@ int flb_plugin_proxy_register(struct flb_plugin_proxy *proxy,
* - plugin type (or proxy type, e.g: Golang)
* - plugin name
* - plugin description
* - plugin's configuration
*/

/* Do the registration */
Expand Down
Loading