Fix active metric files being wiped after the app starts
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
-
Changelog entry for user-facing changes, or community contribution. Check the link for other scenarios. - [-] Documentation created/updated or follow-up review issue created
-
Code review guidelines - [-] Merge request performance guidelines
-
Style guides - [-] Database guides
- [-] Separation of EE specific content
Related to #65278 (closed)
Edited by 🤖 GitLab Bot 🤖