Configuring Gitlab for external Prometheus monitoring

We have an external Prometheus server that we want to use to scrape metrics from Gitlab. The documentation here is clear on how to do this with a single exception:

Step 6:On all GitLab Rails(Puma, Sidekiq) servers, set the Prometheus server IP address and listen port. For example:

Where do I do this? Is this part of /etc/gitlab/gitlab.rb or do these services have their own .rb files? And if it’s the latter, where can I find the correct ones?

Thank you in advance