Skip to content

Show sample metrics for an environment without prometheus

Kirstie Cook requested to merge sample-metrics-without-prometheus into master

What does this MR do?

This continues work started in previous MRs: !19987 (merged) and !22066 (merged). We would like the ability to display sample metrics in the monitoring dashboard without requiring a live Prometheus integration. This will be useful for demos, testing, and speeding up development when not directly working on the Prometheus integration. This MR provides the ability to view the sample metrics that have been previously generated, by allowing environment.has_metrics? to be true when the USE_SAMPLE_METRICS env var is set. This allows the sample metrics to show up, even without any configuration to Prometheus, as that env var redirects the live Prometheus metrics endpoint to the sample metrics endpoint (see !19987 (merged) for more on how this works). Now all that we will need to show sample metrics for a project is to have an environment created and available, it does not need to be pointed to a live Prometheus installation.

This closes #36255 (closed)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability 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 🤖 GitLab Bot 🤖

Merge request reports

Loading