Look please at the code below
metricsMux := http.NewServeMux()
// here I want only to expose metrics outside, without any tracking
// just gather them and write response
metricsMux.Handle("/metrics", promhttp.Handler()) // <------
metricsSrv := &http.Server{Handler: metricsMux}
appMux := http.NewServeMux()
// here I want to add prometheus middleware with "promhttp_"-prefix tracking
// only tracking, without any output written
appSrv := &http.Server{Handler: appMux}
If simply add promhttp.Handler() handler to metrics server(as in my example), "promhttp_"-prefix metrics will contains info about requests to metrics server and it's useless information. I want them to contain metrics for my application.
Short: I'm trying to follow separation of concerns while tracking and exposing metrics.