Open
Description
Hi, in my case I have many spawned tokio tasks that need to be measured.
Measurements for these spawned tasks unique by labels, and once solved I have to remove these measurements from the metrics registry to prevent memory leaks.
At the same time I need to keep metric COUNT_OF_ACTIVE_TASKS
available while my program works.
At now I can't find any way for solving that problem using current API.
builder.idle_timeout
looks good, but I have no guarantees about the interval for spawning new tasks, hence COUNT_OF_ACTIVE_TASKS
could be deleted at any time and its state forgotten.
Can anyone tell me how to solve this problem without writing an absolute value to COUNT_OF_ACTIVE_TASKS
on timeout in an infinite loop? 😂