code: func (s *inMemoryStore) Set(ctx context.Context, h types.Metric, resetTime time.Time, fieldVals []interface{}, value interface{}) {
  	if resetTime.IsZero() {
  		resetTime = clock.Now(ctx)
  	}
  	t := target.Get(ctx)
  
  	m := s.getOrCreateData(h)
  	m.lock.Lock()
  	defer m.lock.Unlock()
  
  	c := m.get(fieldVals, t, resetTime)
  
  	if m.ValueType.IsCumulative() && isLessThan(value, c.Value) {
  		logging.Errorf(ctx,
  			"Attempted to set cumulative metric %q to %v, which is lower than the previous value %v",
  			h.Info().Name, value, c.Value)
  		return
  	}
  
  	c.Value = value
  }
docs: // Set writes the value into the given metric cell.