code: func (m *pcpInstanceMetric) setInstance(val interface{}, instance string) error {
  	if !m.t.IsCompatible(val) {
  		return errors.New("the value is incompatible with this metrics MetricType")
  	}
  
  	if !m.indom.HasInstance(instance) {
  		return errors.Errorf("%v is not an instance of this metric", instance)
  	}
  
  	val = m.t.resolve(val)
  
  	if m.vals[instance].val != val {
  		if m.vals[instance].update != nil {
  			err := m.vals[instance].update(val)
  			if err != nil {
  				return err
  			}
  		}
  
  		m.vals[instance].val = val
  	}
  
  	return nil
  }
docs: // setInstance sets the value for a particular instance of the metric.