Prometheus integration

GitLab offers powerful integration with Prometheus for monitoring key metrics of your apps, directly within GitLab.
Metrics for each environment are retrieved from Prometheus, and then displayed
within the GitLab interface.

There are two ways to setup Prometheus integration, depending on where your apps are running:

Provide the base URL of the your server, for example http://prometheus.example.com/.
The Test Settings button can be used to confirm connectivity from GitLab
to the Prometheus server.

Monitoring CI/CD Environments

Once configured, GitLab will attempt to retrieve performance metrics for any
environment which has had a successful deployment.

GitLab will automatically scan the Prometheus server for metrics from known serves like Kubernetes and NGINX, and attempt to identify individual environment. The supported metrics and scan process is detailed in our Prometheus Metric Library documentation.

Determining the performance impact of a merge

Developers can view the performance impact of their changes within the merge
request workflow. When a source branch has been deployed to an environment, a sparkline and numeric comparison of the average memory consumption will appear. On the sparkline, a dot
indicates when the current changes were deployed, with up to 30 minutes of
performance data displayed before and after. The comparison shows the difference between the 30 minute average before and after the deployment. This information is updated after
each commit has been deployed.

Once merged and the target branch has been redeployed, the metrics will switch
to show the new environments this revision has been deployed to.

Performance data will be available for the duration it is persisted on the
Prometheus server.

Troubleshooting

If the "No data found" screen continues to appear, it could be due to:

No successful deployments have occurred to this environment.

Prometheus does not have performance data for this environment, or the metrics
are not labeled correctly. To test this, connect to the Prometheus server and
run a query, replacing $CI_ENVIRONMENT_SLUG
with the name of your environment.