"Dancing with the Stars" judge Carrie Ann Inaba is on the mend after having an emergency appendectomy.

Inaba, 55, shared that she was recently diagnosed with acute gangrenous appendicitis in an Instagram post Thursday, alongside a compilation video of her four-day hospital stay.

"I had an emergency appendectomy last week and while it's been quite a painful experience, I also know it's a gift to even feel this pain," she wrote in the caption of her post. "I realize after speaking with my doctor that it could have been much worse."

She went on, "Appendicitis attacks happen suddenly and seemingly out of nowhere. And when you are in that much pain, the last thing you want to do is go anywhere. And when you have [an] autoimmune disease, you are often having strange health occurrences that no one can explain or help you with so sometimes, you try to wait it out, like I did. I was wrong."

Inaba went on to say that she felt a pain in her abdomen and "sudden and violent vomiting that knocked me off my feet."

"I should have gone when I couldn't stand without excruciating pain… but I honestly didn't want to leave my babies, and I'm so accustomed to pain -- thought I should let it play out," she added.

She encouraged those experiencing stomach pain to seek medical attention and concluded the post by thanking the staff at Cedars-Sinai Medical Center in Los Angeles for taking care of her.

"Thankfully, my appendix will not be bothering me anymore," she added.

According to the National Institute of Diabetes and Digestive and Kidney Diseases, the most common cause of acute abdominal pain that requires surgery is appendicitis, and if left untreated, the appendix can burst.

Inaba received well-wishes from her fans and "DWTS" colleagues, including fellow judge Derek Hough, who replied in the comments section.

"Get well soon," he wrote. "I had that a few years ago. Glad you got it taken care of. Feel better."