Skip to content

feat(monitoring): allow using custom http.ServeMux

João Pereira requested to merge monitoring-allow-custom-serve-mux into master

Problem

So far it was not possible to use a custom http.ServeMux for the monitoring service. This is a problem if an application needs to handle other routes under the /debug path.

We currently have this problem with the container registry, as it needs to provide a /debug/health route.

Related to container-registry#247 (closed).

Solution

Add a new WithServeMux option that can be passed to the monitoring.Start function. The default mux will continue to be set to http.NewServeMux(), so this is retro compatible.

Edited by João Pereira

Merge request reports