From 95b733cf96de846132958e7857a191eeb9709e56 Mon Sep 17 00:00:00 2001 From: Matthew Fala Date: Mon, 7 Nov 2022 21:31:34 +0000 Subject: [PATCH] engine: add task instrumentation --- src/flb_engine.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/flb_engine.c b/src/flb_engine.c index 81ad9afbfe2..c1f555a3564 100644 --- a/src/flb_engine.c +++ b/src/flb_engine.c @@ -106,6 +106,7 @@ int flb_engine_flush(struct flb_config *config, struct flb_input_instance *in; struct flb_input_plugin *p; struct mk_list *head; + char task_count[20]; mk_list_foreach(head, &config->inputs) { in = mk_list_entry(head, struct flb_input_instance, _head); @@ -117,6 +118,9 @@ int flb_engine_flush(struct flb_config *config, flb_engine_dispatch(0, in, config); } + sprintf(task_count, "%i", flb_task_running_count(config)); + flb_log_recurring_event("task_count", task_count); + return 0; }