You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic metrics afforded to each plugin (ie. dropped_records, errors_total, etc) are quite powerful but are sometimes not enough. For example, when developing a custom GCS plugin, we've found the lack of a visibility into metrics like the frequencies of types of errors, objects created, etc to be blockers. We would like the ability to add custom metrics to the flbgoplugin.
From a high level, this seems possible. Typically, a plugin's custom metrics are attached to its plugin struct. However, this does not seem strictly necessary. Instead, as long as a pointer to the metrics object is held and freed appropriately, then binding the metric object to the struct seems unneeded. Decoupling the plugin struct and the metric pointer is required for this issue's proposed change. Decoupling is necessary because the library needs to service all possible plugins (and associated metrics) and updating the flbgo_output_plugin for each plugin is a non-starter.
Could something to the effect of ...
structcmt_counter*create_counter_metric(void*plugin)
{
structflbgo_output_plugin*p=plugin;
structcmt_counter*counter;
counter=cmt_counter_create(p->o_ins->cmt,
"fluentbit",
"my_plugin",
"requests_total",
"Total number of requests.",
1,
(char*[]) {"status"});
returncounter;
}
be added to the flb_output.h file? And then when FluentBit collects metrics, the metrics stored under a given flb_output_instance's cmt attribute can be fetched?
The text was updated successfully, but these errors were encountered:
The basic metrics afforded to each plugin (ie.
dropped_records
,errors_total
, etc) are quite powerful but are sometimes not enough. For example, when developing a custom GCS plugin, we've found the lack of a visibility into metrics like the frequencies of types of errors, objects created, etc to be blockers. We would like the ability to add custom metrics to theflbgo
plugin.From a high level, this seems possible. Typically, a plugin's custom metrics are attached to its plugin struct. However, this does not seem strictly necessary. Instead, as long as a pointer to the metrics object is held and freed appropriately, then binding the metric object to the struct seems unneeded. Decoupling the plugin struct and the metric pointer is required for this issue's proposed change. Decoupling is necessary because the library needs to service all possible plugins (and associated metrics) and updating the
flbgo_output_plugin
for each plugin is a non-starter.Could something to the effect of ...
be added to the
flb_output.h
file? And then when FluentBit collects metrics, the metrics stored under a givenflb_output_instance
'scmt
attribute can be fetched?The text was updated successfully, but these errors were encountered: