Prometheus metrics plugin

I’ve installed the Prometheus metrics plugin 2.2.3 in my Jenkins instance.

It has been like this since the instance started:

And accessing its endpoint /prometheus returns a blank page.

How can I debug this?

Just found this in Jenkins logs, happening from 20 to 20 minutes for different paths:

Jul 13, 2023 12:52:34 PM org.jenkinsci.plugins.workflow.job.WorkflowRun getListener WARNING: null java.lang.IllegalStateException: trying to open a build log on environments/xx/yy #38 after it has completed at org.jenkinsci.plugins.workflow.job.WorkflowRun.getListener(WorkflowRun.java:232) at org.jenkinsci.plugins.workflow.job.WorkflowRun$Owner.getListener(WorkflowRun.java:1025) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.createPlaceholderNodes(CpsFlowExecution.java:652) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.onLoad(CpsFlowExecution.java:737) at org.jenkinsci.plugins.workflow.job.WorkflowRun.getExecution(WorkflowRun.java:720) at org.jenkinsci.plugins.prometheus.JobCollector.processRun(JobCollector.java:391) at org.jenkinsci.plugins.prometheus.JobCollector.appendJobMetrics(JobCollector.java:298) at org.jenkinsci.plugins.prometheus.JobCollector.lambda$collect$0(JobCollector.java:227) at org.jenkinsci.plugins.prometheus.util.Jobs.forEachJob(Jobs.java:19) at org.jenkinsci.plugins.prometheus.JobCollector.collect(JobCollector.java:220) at io.prometheus.client.Collector.collect(Collector.java:45) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.findNextElement(CollectorRegistry.java:204) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:219) at io.prometheus.client.CollectorRegistry$MetricFamilySamplesEnumeration.nextElement(CollectorRegistry.java:152) at io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:71) at org.jenkinsci.plugins.prometheus.service.DefaultPrometheusMetrics.collectMetrics(DefaultPrometheusMetrics.java:54) at org.jenkinsci.plugins.prometheus.service.PrometheusAsyncWorker.execute(PrometheusAsyncWorker.java:41) at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:102) at java.base/java.lang.Thread.run(Thread.java:829)

It looks like it is trying to fetch Build Metrics from non-existing jobs - these were already deleted because they are created based on branches from GitHub and those branches were deleted in the meantime.

Is there any way to prevent this?
I’ve already disabled all the possible metrics: