Whether you're writing or recording music, you'll never go far wrong if you stick to the rule of always doing what's best for the song. This goes for both musicians and producers. A good producer isn't one that goes into the studio with the intention of showing off every little trick he knows in the book. It's the guy who knows how to best serve each track he works on, even if that means doing less to get a better result. Same goes for a guitarist. You could be the fastest most technical player on the planet, but none of that would matter if you didn't recognize when and where you should take the spotlight or ease off in a track. It's not about you getting noticed 100% of the time, the goal is to do whatever the song needs to be it's best as a whole.
Say for instance, you want a huge guitar sound in the chorus of a song. Half the battle to achieving this could be to have less (or even no) guitar in the verse. So when your chorus kicks in, the guitars will sound huge next to the emptier section of the song that came beforehand. And all that could be achieved just by you NOT DOING something in the verse.
A piece of advice I sometimes give bands when we're mixing a track, is to try and disconnect from their own personal parts in the music and listen to the track as a whole song. Once every instrument and part are working well together to keep the song interesting and exciting as a whole, your job is done. Remember, you're not sending your instruments in solo one by one to radio. People will hear the track as a full finished wall of sound. Always keep that big picture in mind when working on your own parts.