The first thing to do is contact your vet just to make him aware of the situation. It depends on the size and type of earring, if there are any sharp edges that can cause internal injury. Generally, these small items are passed when the dog defecates. You'll have to carefully examine his poop for a day or two to see if the earring has passed. Try to keep all objects like the earring or anything you don't want chewed or that can be a danger if swallowed out of your dog's reach. Offer him several safe toys to chew instead.