The good news is, the broken-off piece is a portion of the locking block, which is an easily replaceable part. The bad news is, Glock probably won't send it directly to you, they'll want a Glock armorer to do the installation. Do you know if one of your local gun/sporting-goods stores has a Glock armorer on staff? If so, Glock might send the part right out to him/her, and it could be fixed minutes after the part arrives.
I agree with denner; that gun looks bone-dry. A well-informed sales person would know that Glock recommends all their handguns be cleaned and lubricated in accordance with the manual BEFORE their first firing (check the section of the manual on cleaning/preventative maintenance). Sending you down to the range to shoot a brand-new, unlubricated handgun could well have contributed to the premature failure of that part. You might want to run that by the shop/range owner, especially if he is a Glock Stocking Dealer. They don't take kindly to customers being told to do things that are the opposite of what the manual says, which is why they give free slots in their Glock Armorer classes to representatives of every stocking dealer (or at least, they USED to do this; not sure if it's still done).
In any case, Glock will definitely take care of you, but yes, it may take some time to get it done.
"Placement is power" -- seen in an article by Stephen A. Camp
(RIP, Mr. Camp; you will be remembered, and missed)