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
1 change: 1 addition & 0 deletions include/fluent-bit/flb_plugin_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ struct flb_plugin_proxy_def {
int flags;
char *name; /* plugin short name */
char *description; /* plugin description */
int event_type; /* event type (logs/metrics/traces) */
};

/* Proxy context */
Expand Down
11 changes: 10 additions & 1 deletion src/flb_plugin_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,14 @@ static int flb_proxy_register_output(struct flb_plugin_proxy *proxy,
out->flags = def->flags;
out->name = flb_strdup(def->name);

/* If event_type is unset (0) then default to logs (this is the current behavior) */
if (def->event_type == 0) {
out->event_type = FLB_OUTPUT_LOGS;
}
else {
out->event_type = def->event_type;
}

out->description = def->description;
mk_list_add(&out->_head, &config->out_plugins);

Expand Down Expand Up @@ -396,6 +404,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;

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

/*
Expand Down Expand Up @@ -612,7 +621,7 @@ struct flb_plugin_proxy *flb_plugin_proxy_create(const char *dso_path, int type,
return NULL;
}

proxy->def = flb_malloc(sizeof(struct flb_plugin_proxy_def));
proxy->def = flb_calloc(1, sizeof(struct flb_plugin_proxy_def));
if (!proxy->def) {
flb_errno();
dlclose(handle);
Expand Down
Loading