code: func updateInstances(c context.Context) {
  	now := clock.Now(c)
  	q := datastore.NewQuery("InstanceCount").Order("computed")
  	if err := datastore.Run(c, q, func(ic *InstanceCount) {
  		if now.Sub(ic.Computed) > 10*time.Minute {
  			logging.Debugf(c, "deleting outdated count %q", ic.Prefix)
  			if err := datastore.Delete(c, ic); err != nil {
  				logging.Errorf(c, "%s", err)
  			}
  			return
  		}
  		for _, conf := range ic.Configured {
  			configuredInstances.Set(c, int64(conf.Count), ic.Prefix, conf.Project)
  		}
  		for _, crea := range ic.Created {
  			createdInstances.Set(c, int64(crea.Count), ic.Prefix, crea.Project, crea.Zone)
  		}
  		for _, conn := range ic.Connected {
  			connectedInstances.Set(c, int64(conn.Count), ic.Prefix, conn.Project, conn.Server, conn.Zone)
  		}
  	}); err != nil {
  		errors.Log(c, errors.Annotate(err, "failed to fetch counts").Err())
  	}
  }
docs: // updateInstances sets GCE instance metrics.