Skip to content

Avoid warnings from Prometheus client in development/test Rails environment

Peter Leitzen requested to merge pl-prometheus-env-warning into master

What does this MR do?

Avoid warnings from Prometheus client in dev/test

Set ennvar prometheus_multiproc_dir before initializing Prometheus client's configuration.o

After https://gitlab.com/gitlab-org/prometheus-client-mmap/commit/7a8bb0f Prometheus client will warn if the envvar prometheus_multiproc_dir is not set.

See also https://gitlab.com/gitlab-org/prometheus-client-mmap/issues/29

The warning on GDK

@tkuah on Slack:

I'm seeing above now on rails db:migrate and also on many spec runs. Is it an issue ?

W, [2019-07-01T12:28:40.619652 #46649]  WARN -- : Please set prometheus_multiproc_dir to persistent directory path. Temporarily writing mmap files to /var/folders/_6/dnrbb2cj01l2_9k407091t4c0000gn/T/prometheus-mmap20190701-46649-17zvpsu

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Leitzen

Merge request reports