Open lukedirtwalker opened 5 years ago
We now have a separate [metrics]
and [api]
configuration sections, to define the listen address of separate web services responsible for the prometheus metrics and OpenAPI, respectively. The applications start both services explicitly if configured, as required in 2 above.
The StatusPages
APIs are still available via both the "metrics" and the "api" server. This does not appear to make much sense and should be cleaned up.
In
env.Metrics
we specify the address we export Prometheus metrics. But we deliberately also serve other data on this address. Therefore we should change:Metrics.Prometheus
config toHTTP.Address
and add a flag whether Prometheus should be enabled.http.ListenAndServe
inenv.StartPrometheus
it should be the app's responsibility to do so.