code: func (p *Plugin) RegisterGaugeFunc(registryPath string, namespace string, subsystem string, name string, help string,
  	labels prometheus.Labels, valueFunc func() float64) error {
  
  	p.Lock()
  	defer p.Unlock()
  
  	reg, found := p.regs[registryPath]
  	if !found {
  		p.Log.WithField("path", registryPath).Error(ErrRegistryNotFound)
  		return ErrRegistryNotFound
  	}
  
  	gaugeName := name
  	if subsystem != "" {
  		gaugeName = subsystem + "_" + gaugeName
  	}
  	if namespace != "" {
  		gaugeName = namespace + "_" + gaugeName
  	}
  
  	err := reg.Register(prometheus.NewGaugeFunc(
  		prometheus.GaugeOpts{
  			Namespace:   namespace,
  			Subsystem:   subsystem,
  			Name:        name,
  			Help:        help,
  			ConstLabels: labels,
  		},
  		valueFunc,
  	))
  	if err != nil {
  		p.Log.Errorf("GaugeFunc('%s') registration failed: %s", gaugeName, err)
  		return err
  	}
  	p.Log.Infof("GaugeFunc('%s') registered.", gaugeName)
  	return nil
  }
docs: // RegisterGaugeFunc registers custom gauge with specific valueFunc to report status when invoked.
  // This method simplifies using of Register for common use case. If you want create metric different from
  // GagugeFunc or you're adding a metric that will be unregister later on, use generic Register method instead.
  // RegistryPath identifies the registry where gauge is added.