I usually mark the extractor groove of a rifle case with a marker. For low pressure rounds, like 45 ACP, you can mark the heads directly, but the ink does transfer to the breech face. It's common for bull's eye match shooters to mark all their cases so folks on adjacent firing points will return them when the pick them up during policing of brass. Some guys at matches used to use several colors to personalize their marks that covered the whole head. That would transfer enough for the breech face on the slide to become gummy by the end of a match and be in need of some acetone to clean it off. I've also tried putting ink down in extractor grooves to mitigate the transfer, but other people don't look there and it's not convenient for me to look at, either.
My dad got tired of the ink marking routine and used a hacksaw to put grooves across the heads of his 45 ACP cases. He bisected the head with them going straight across the primer pockets to about the depth of their mouth radius. With the target loads we were using in bull's eye matches then (about 4 grains of Bullseye under 200 grain cast bullets) the primer showed no tendency to flow into the grooves at all.
Another method I've used with 308 cases in the past is to hit the head with an automatic centerpunch with its spring unscrewed to a minimum marking force. I used that to keep track of the number of reloads my M1A cases had for awhile. The problem with it is the punch raises the surface slightly around the dimple it makes in the brass. That flattens back out on the next firing, but for high precision it's a potential source of an additional recoil moment, so I wouldn't count on drilling bugholes with cases marked by such a tool until after the first flattening out had been completed. I saw no effect for service rifle accuracy purposes, but YMMV. Test it in your gun.
You can also use a small triangle file to notch a rim. For self-loaders, that could make a weak spot for tearing, but for a bolt rifle not firing loads so hot you have sticky extraction, it's fine.