Skip to content

Migrate prometheus metric cards to Pajamas

What does this MR do and why?

  • Migrate card at app/views/shared/integrations/prometheus/_custom_metrics.html.haml
  • Migrate card(s) at app/views/shared/integrations/prometheus/_metrics.html.haml, extension of MR #114361

Screenshots or screen recordings

before after
image Screenshot_from_2023-03-16_22-20-05

How to set up and validate locally

Setup prometheus (Optional, if you have no Prometheus instance available)

  1. Run Prometheus as a Docker Container
docker run -p 9090:9090 prom/prometheus
  1. Go to Admin > Settings > Network > Outbound Request and tick Allow requests to the local network from webhooks and integrations to allow connection with localhost.
  2. Setup <Project> > Integrations > Prometheus with the docker container as your API_URL.

Create a custom metric

  1. Go to the Edit page for the Prometheus integration.
  2. Create a custom metric, use the default values from the hint/placeholder if you're unsure what values to put.
  3. The card should now contain a new custom metric.

Card states to check

  1. Empty Metric (The default view)
  2. w/ Custom Metric (Follow steps above)
  3. w/ Loader
  4. w/ Flash (During load, press the x thing besides the address bar that prevent the page to completely load).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Fixes #367124 (closed), Fixes #394910 (closed)

Merge request reports