code: func (app *App) register(routeName string, dispatch dispatchFunc) {
  	handler := app.dispatcher(dispatch)
  
  	// Chain the handler with prometheus instrumented handler
  	if app.Config.HTTP.Debug.Prometheus.Enabled {
  		namespace := metrics.NewNamespace(prometheus.NamespacePrefix, "http", nil)
  		httpMetrics := namespace.NewDefaultHttpMetrics(strings.Replace(routeName, "-", "_", -1))
  		metrics.Register(namespace)
  		handler = metrics.InstrumentHandler(httpMetrics, handler)
  	}
  
  	// TODO(stevvooe): This odd dispatcher/route registration is by-product of
  	// some limitations in the gorilla/mux router. We are using it to keep
  	// routing consistent between the client and server, but we may want to
  	// replace it with manual routing and structure-based dispatch for better
  	// control over the request execution.
  
  	app.router.GetRoute(routeName).Handler(handler)
  }
docs: // register a handler with the application, by route name. The handler will be
  // passed through the application filters and context will be constructed at
  // request time.