code: func (p *Plugin) AfterInit() error {
  	if p.HTTP != nil {
  		p.Lock()
  		defer p.Unlock()
  		for path, reg := range p.regs {
  			p.HTTP.RegisterHTTPHandler(path, p.createHandlerHandler(reg.Gatherer, reg.httpOpts), "GET")
  			p.Log.Infof("Serving %s on port %d", path, p.HTTP.GetPort())
  
  		}
  	} else {
  		p.Log.Info("Unable to register Prometheus metrics handlers, HTTP is nil")
  	}
  
  	return nil
  }
docs: // AfterInit registers HTTP handlers.