Fasting and delivery

I have been taking insulin and metformin for my entire third trimester and it seems like I’m still unable to manage my fasting levels. I’ve been waking up at 1am-3am and check my sugars and they are 120s-130s. My snacks have been consistent with peanut butter/ apple. I guess I’m just fed up and seeing what other experiences have been and when to look for more answers about going earlier. At my 34 week appointment, the doctors told me that I can go earlier if I can’t control my levels. Does this constitute a elective birth ? I am current 36 weeks