func (s *Server) Start() error {
	return s.listenAndServe()
}
Start registers application-specific metrics and starts the HTTP server.
package prometheus
import (
	"context"
	"fmt"
	"net/http"
	"github.com/prometheus/client_golang/prometheus/promhttp"
	"github.com/yorkie-team/yorkie/internal/log"
)
type Server struct {
	conf          *Config
	metrics       *Metrics
	metricsServer *http.Server
}
func NewServer(conf *Config, met *Metrics) *Server {
	return &Server{
		conf:    conf,
		metrics: met,
		metricsServer: &http.Server{
			Addr: fmt.Sprintf(":%d", conf.Port),
		},
	}
}
func (s *Server) listenAndServe() error {
	go func() {
		log.Logger.Infof(fmt.Sprintf("serving Metrics on %d", s.conf.Port))
		serveMux := http.NewServeMux()
		serveMux.Handle("/metrics", promhttp.HandlerFor(s.metrics.Registry(), promhttp.HandlerOpts{}))
		s.metricsServer.Handler = serveMux
		if err := s.metricsServer.ListenAndServe(); err != http.ErrServerClosed {
			log.Logger.Error("HTTP server ListenAndServe: %v", err)
		}
	}()
	return nil
}