Skip to content

Commit

Permalink
engine: add task instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfala committed Nov 7, 2022
1 parent b853a88 commit 95b733c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flb_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit 95b733c

Please sign in to comment.