code: func (s *Service) probeGCEEnvironment(c context.Context) {
  	s.onGCE = metadata.OnGCE()
  	if !s.onGCE {
  		log.Infof(c, "Not on GCE.")
  		return
  	}
  
  	// Determine our service ID from metadata. The service ID will equal the cloud
  	// project ID.
  	if s.serviceID == "" {
  		var err error
  		if s.serviceID, err = metadata.ProjectID(); err != nil {
  			log.WithError(err).Warningf(c, "Failed to probe GCE project ID.")
  		}
  
  		log.Fields{
  			"serviceID": s.serviceID,
  		}.Infof(c, "Probed GCE service ID.")
  	}
  }
docs: // probeGCEEnvironment fills in any parameters that can be probed from Google
  // Compute Engine metadata.
  //
  // If we're not running on GCE, this will do nothing. It is non-fatal if any
  // given GCE field fails to be probed.