Skip to content

Fix active metric files being wiped after the app starts

Aleksei Lipniagov requested to merge 65278-fix-puma-master-counter-wipe into master

What does this MR do?

When we hit our app with the initial request, in warmup, some metrics already being created as well as corresponding files.

If we do multiproc_file_dir cleanup after that, we delete the files from the dir while keeping them in memory which leads to the incorrect behavior:
the metric is being updated in in-memory, while is not present in the db file on the disc, and not sent to Prometheus as the result.

To fix this, we should not wipe the metrics dir after any metrics are initialized in our app.

Does this MR meet the acceptance criteria?

Conformity

Related to #65278 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports